From: hickert Date: Wed, 27 Feb 2008 10:47:27 +0000 (+0000) Subject: Updated gosaSupportDaemon. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86f41661e7031679539e4e175627128e1fb96b67;p=gosa.git Updated gosaSupportDaemon. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9162 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 4c4ddcde0..d3ba4ac8c 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -567,6 +567,32 @@ $xml_msg.= " } + public function send_data($header, $to, $data= array(), $answer_expected = FALSE) + { + $xml_message= ""; + + /* Prepare data */ + foreach ($data as $key => $value){ + $xml_message.= "<$key>$value"; + } + + /* Multiple targets? */ + if (!is_array($to)){ + $to_targets= array($to); + } else { + $to_targets= $to; + } + + /* Build target strings */ + $target =""; + foreach($to_targets as $to){ + $target.= "$to"; + } + + return $this->_send("
$header
GOSA$target".$xml_message."
",$answer_expected); + } + + /*! \brief Returns an array containing all queued entries. @return Array All queued entries as an array. */ @@ -577,7 +603,6 @@ $xml_msg.= " if($this->connect()){ $this->o_sock->write($data); - if ($answer_expected){ $str = trim($this->o_sock->read()); $entries = $this->xml_to_array($str);