Code

Fixed si function
[gosa.git] / gosa-core / include / class_gosaSupportDaemon.inc
index 7ae5e3ccd28d2dc02e0be6c267b42d3b043bd12b..7d8a4f494c94a1a8a041f0909cff547805d6fbcf 100644 (file)
@@ -144,6 +144,7 @@ class gosaSupportDaemon
       "<release>".$release."</release>".
       "</xml>";
 
+    $ret = array();
     if($this->connect()){
       $this->o_sock->write($xml_msg);
       $str = trim($this->o_sock->read());
@@ -419,25 +420,23 @@ class gosaSupportDaemon
     }
 
     $xml_msg = 
-"<xml>
+      "<xml>
       <header>gosa_query_jobdb</header>
       <target>GOSA</target>
       <source>GOSA</source>
       ".$tags."
 
       <orderby>".$sort."</orderby>";
-if($from != -1 && $to != -1){
-$xml_msg.= "
-      <limit>
-       <from>".$from."</from>
-       <to>".$to."</to>
-      </limit>";
-}
-$xml_msg.= "
+    if($from != -1 && $to != -1){
+      $xml_msg.= "
+        <limit>
+        <from>".$from."</from>
+        <to>".$to."</to>
+        </limit>";
+    }
+    $xml_msg.= "
       </xml>";
 
-    echo htmlentities($xml_msg);
-
     if($this->connect()){
       $this->o_sock->write($xml_msg);
       $str = trim($this->o_sock->read());
@@ -942,6 +941,7 @@ $xml_msg.= "
       $tags.
       "</xml>";
 
+    $xml_msg ="<xml><header>gosa_count_jobdb</header><target>GOSA</target><source>GOSA</source></xml>";
     $this->connect();
     if($this->connect()){
       $this->o_sock->write($xml_msg);
@@ -954,7 +954,6 @@ $xml_msg.= "
       }
 
       $entries = $this->xml_to_array($str);
-      print_a($entries);
       if(isset($entries['XML'])){
         return($entries['XML']['COUNT']);
       }