summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8b6e892)
raw | patch | inline | side by side (parent: 8b6e892)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Feb 2008 08:03:00 +0000 (08:03 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Feb 2008 08:03:00 +0000 (08:03 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8944 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_gosaSupportDaemon.inc | patch | blob | history |
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 7dc12f1d21b115bfb90626c4371c043d4f6f004c..b712d7614f4cd04d8dd19ae71f7462c471231802 100644 (file)
$str = trim($this->o_sock->read());
$entries = $this->xml_to_array($str);
if(isset($entries['XML']) && is_array($entries['XML'])){
- $ret = $entries;
+
+ /* Check if returned values represent a valid answer */
+ if($entries['XML']['HEADER'] == "answer"){
+
+ /* Unset header tags */
+ foreach(array("HEADER","SOURCE","TARGET") as $type){
+ unset($entries['XML'][$type]);
+ }
+ $ret = $entries;
+ }
}
}
$entries = $this->xml_to_array($str);
if(isset($entries['XML']) && is_array($entries['XML'])){
foreach($entries['XML'] as $entry){
- $ret[] = $entry['ID'];
+ if(isset($entry['ID'])){
+ $ret[] = $entry['ID'];
+ }
}
}
}
<operator>eq</operator>
<id>".$id."</id>
</phrase>";
- $ret[$id] = FALSE;
}
$xml_msg .= "</clause>
</where>
$str = trim($this->o_sock->read());
$entries = $this->xml_to_array($str);
if(isset($entries['XML'])){
- $ret = $entries['XML'];
+ foreach($entries['XML'] as $name => $entry){
+ if(preg_match("/^ANSWER[0-9]*$/",$name)){
+ $ret[$name] = $entry;
+ }
+ }
}
}
return($ret);
$this->o_sock->write($xml_msg);
$str = trim($this->o_sock->read());
$entries = $this->xml_to_array($str);
- if(isset($entries['XML']['ANSWER1'])){
+ if( isset($entries['XML']['HEADER']) &&
+ $entries['XML']['HEADER']=="answer" &&
+ isset($entries['XML']['ANSWER1'])){
return(TRUE);
}
}
$this->o_sock->write($xml_msg);
$str = trim($this->o_sock->read());
$entries = $this->xml_to_array($str);
- if(isset($entries['XML']['ANSWER1'])){
+ if( isset($entries['XML']['HEADER']) &&
+ $entries['XML']['HEADER']=="answer" &&
+ isset($entries['XML']['ANSWER1'])){
$ret = $entries['XML']['ANSWER1'];
}
}