From: hickert Date: Tue, 25 Mar 2008 10:54:48 +0000 (+0000) Subject: Updated gosaSupportDaemon X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5f4ccc836546fe961de124c1a7e5c2a5af91a1de;p=gosa.git Updated gosaSupportDaemon -Implemented FAI - Package function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9967 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 9850be249..af43e3bee 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -134,6 +134,46 @@ class gosaSupportDaemon } + public function FAI_get_packages($release) + { + $this->reset_error(); + + $xml_msg = "
gosa_query_packages_list
GOSAGOSA". + "".$release."
"; + + $ret = array(); + if($this->connect()){ + $this->o_sock->write($xml_msg); + $str = trim($this->o_sock->read()); + $entries = $this->xml_to_array($str); + if(isset($entries['XML']) && is_array($entries['XML'])){ + + /* Check if returned values represent a valid answer */ + if(isset($entries['XML'])){ + if(isset($entries['XML']['ERROR_STRING'])) { + $this->set_error($entries['XML']['ERROR_STRING']); + new log("debug","GOsa-si", + get_class($this)."::".__FUNCTION__, array(), + "FAILED error was ".$this->get_error()); + return($ret); + } + + /* Unset header tags */ + foreach(array("HEADER","SOURCE","TARGET","SESSION_ID") as $type){ + if(isset($entries['XML'][$type])){ + unset($entries['XML'][$type]); + } + } + $ret = $entries['XML']; + } + } + } + return($ret); + + + } + + public function FAI_get_server($name = "") { $this->reset_error();