summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a2eec6a)
raw | patch | inline | side by side (parent: a2eec6a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Feb 2008 10:47:27 +0000 (10:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Feb 2008 10:47:27 +0000 (10:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9162 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 4c4ddcde04484e9801f0f0760852fc38ac23fc76..d3ba4ac8ce4502978f720f4417d7e2eb00000f99 100644 (file)
}
+ public function send_data($header, $to, $data= array(), $answer_expected = FALSE)
+ {
+ $xml_message= "";
+
+ /* Prepare data */
+ foreach ($data as $key => $value){
+ $xml_message.= "<$key>$value</$key>";
+ }
+
+ /* Multiple targets? */
+ if (!is_array($to)){
+ $to_targets= array($to);
+ } else {
+ $to_targets= $to;
+ }
+
+ /* Build target strings */
+ $target ="";
+ foreach($to_targets as $to){
+ $target.= "<target>$to</target>";
+ }
+
+ return $this->_send("<xml><header>$header</header><source>GOSA</source>$target".$xml_message."</xml>",$answer_expected);
+ }
+
+
/*! \brief Returns an array containing all queued entries.
@return Array All queued entries as an array.
*/
if($this->connect()){
$this->o_sock->write($data);
-
if ($answer_expected){
$str = trim($this->o_sock->read());
$entries = $this->xml_to_array($str);