Code

Updated package search
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Apr 2008 14:20:09 +0000 (14:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Apr 2008 14:20:09 +0000 (14:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10368 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_gosaSupportDaemon.inc

index 9ceccc240c7860dd8bc4e733370d0cf852e1f9ab..01c12fcdea1ee751c1b34b8e75efd0fd0fd122f8 100644 (file)
@@ -154,15 +154,17 @@ class gosaSupportDaemon
     /* Create list of attributes to fetch */
     $pkgs = ""; 
     foreach($package as $pkg){
-      $pkgs .="<phrase>
+      $pkgs .="
+               <phrase>
                 <operator>like</operator>
                 <package>".$pkg."</package>
-               </phrase>";
+               </phrase>
+             ";
 
     }
 
     /* Create Daemon query */
-    if(empty($package)){
+    if(!count($package)){
       $xml_msg = "<xml><header>gosa_query_packages_list</header><target>GOSA</target><source>GOSA</source>".
         $attr.
         "<where><clause><phrase><distribution>".$release."</distribution></phrase></clause></where>
@@ -171,13 +173,13 @@ class gosaSupportDaemon
          $xml_msg = "<xml><header>gosa_query_packages_list</header><target>GOSA</target><source>GOSA</source>".
         $attr.
         "<where>
-            <connector>AND</connector>
             <clause>
-              <phrase><distribution>".$release."</distribution></phrase>
-            </clause>
-            <clause>
-             <connector>OR</connector>
-             $pkgs
+             <connector>AND</connector>
+             <phrase><distribution>".$release."</distribution></phrase>
+              <clause>
+              <connector>OR</connector>
+               ".$pkgs."
+             </clause>
             </clause>
          </where>
          <limit><from>0</from><to>100</to></limit>