summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 492d7e4)
raw | patch | inline | side by side (parent: 492d7e4)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 08:15:42 +0000 (08:15 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 08:15:42 +0000 (08:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8645 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_gosaSupportDaemon.inc | patch | blob | history | |
gosa-core/plugins/addons/gotomasses/class_gotomasses.inc | patch | blob | history |
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index bd5766367ee305c232871cf84c555580121b76ba..98b568701a99f042a045e1ee26312fa40146d59d 100644 (file)
class gosaSupportDaemon
{
- static private $s_host = "";
- static private $i_port = 0;
- static private $s_encryption_key = "";
+ private $s_host = "";
+ private $i_port = 0;
+ private $s_encryption_key = "";
private $o_sock = NULL;
private $f_timeout = 2;
# load from config, store statically
if (isset($config->current['GOSA_SI'])){
- if (gosaSupportDaemon::$s_host == ""){
- $host= preg_replace("/^.*@([^:]+):.*$/", "$1", $config->current['GOSA_SI']);
- $port= preg_replace("/^.*@[^:]+:(.*)$/", "$1", $config->current['GOSA_SI']);
- $key = preg_replace("/^(.*)@[^:]+:.*$/", "$1", $config->current['GOSA_SI']);
-
- gosaSupportDaemon::$s_host = $host;
- gosaSupportDaemon::$i_port = $port;
- gosaSupportDaemon::$s_encryption_key = $key;
+ if ($this->s_host == ""){
+ $this->s_host= preg_replace("/^.*@([^:]+):.*$/", "$1", $config->current['GOSA_SI']);
+ $this->i_port= preg_replace("/^.*@[^:]+:(.*)$/", "$1", $config->current['GOSA_SI']);
+ $this->s_encryption_key = preg_replace("/^(.*)@[^:]+:.*$/", "$1", $config->current['GOSA_SI']);
}
$this->f_timeout = $timeout;
*/
public function connect()
{
- $this->o_sock = new Socket_Client(gosaSupportDaemon::$s_host,gosaSupportDaemon::$i_port,TRUE,$this->f_timeout);
+ $this->o_sock = new Socket_Client($this->s_host,$this->i_port,TRUE,$this->f_timeout);
if($this->o_sock->connected()){
- $this->o_sock->setEncryptionKey(gosaSupportDaemon::$s_encryption_key);
+ $this->o_sock->setEncryptionKey($this->s_encryption_key);
$this->is_connected = TRUE;
}else{
$this->error = $this->o_sock->get_error();
$ret = $entries;
}
}
+
return($ret);
}
+
/*! \brief Checks if the given ids are used queue ids.
@param Array The ids we want to check..
@return Array An array containing all ids as index and TRUE/FALSE as value.
}
}
}
+
if(!isset($params['XML'])){
- $this->set_error(_("Could not parse XML."));
- $params = array();
+ if (!array_key_exists('XML', $params)){
+ $this->set_error(_("Could not parse XML."));
+ }
+ $params = array("COUNT" => 0);
}
+
return($params);
}
diff --git a/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc b/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc
index d3b15f2a7cca3fd50d2327a20c4c9f32c5f35667..75b40f62ffd80ffa996a8632f4a725c539977504 100644 (file)
$stop = $this->range;
$entries = $this->o_queue->get_queued_entries($start,$stop,$sort);
if(!is_array($entries) || !isset($entries['XML']) || !is_array($entries['XML'])){
- msg_dialog::display(_("Error"), sprintf(_("Cannot load queue entries: %s"), "<br><br>".$this->o_queue->get_error()), ERROR_DIALOG);
+ if ($this->o_queue->get_error()){
+ msg_dialog::display(_("Error"), sprintf(_("Cannot load queue entries: %s"), "<br><br>".$this->o_queue->get_error()), ERROR_DIALOG);
+ }
return(array());
}