summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed4bdb4)
raw | patch | inline | side by side (parent: ed4bdb4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Mar 2008 07:44:22 +0000 (07:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Mar 2008 07:44:22 +0000 (07:44 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10006 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 8270f9ffc2fb7abf841ae56f0b5d6a8e04139834..de02dd55b3460e2a3537795290be0e39785e8305 100644 (file)
$this->reset_error();
$ret = array();
+ /* Check Parameter */
if(!is_array($attrs) || !count($attrs)){
trigger_error("Second parameter must be an array. With at least one attribute name.");
return($ret);
}
-
- $attr = "<select>package</select>";
+
+ /* Create list of attributes to fetch */
+ $attr = "";
foreach($attrs as $at){
-# $attr.= "<select>".trim($at)."</select>";
+ $attr.= $at.", ";
}
-
+
+ /* Create Daemon query */
if(empty($package)){
$xml_msg = "<xml><header>gosa_query_packages_list</header><target>GOSA</target><source>GOSA</source>".
- $attr.
- "<where><clause><phrase><distribution>".$release."</distribution></phrase></clause></where><limit>10</limit></xml>";
+ "<select> ".trim($attr,", ")." </select>".
+ "<where><clause><phrase><distribution>".$release."</distribution></phrase></clause></where>
+ </xml>";
}else{
- $xml_msg =
- "<xml><header>gosa_query_packages_list</header><target>GOSA</target><source>GOSA</source>".
- $attr.
- "<where><clause>".
- "<connector>AND</connector>".
- "<phrase><distribution>".$release."</distribution></phrase>".
- "<phrase><package>".$package."</package></phrase>".
- "</clause></where>".
- "<limit>10</limit></xml>";
}
+ echo htmlentities($xml_msg);
+
if($this->connect()){
$this->o_sock->write($xml_msg);
$str = trim($this->o_sock->read());