index 7001880bfbefa983323db212d13d8e022c28900a..7c9fe51fc80b69af961f9acfb0e5f8ccd9589073 100644 (file)
var $filename = "";
var $last_modified = 0;
+ var $gosaUUID = "";
+
private $jsonRPChandle = NULL;
public $configRegistry = NULL;
$this->parser = xml_parser_create();
$this->basedir= $basedir;
+ $this->gosaUUID = uniqid();
+
xml_set_object($this->parser, $this);
xml_set_element_handler($this->parser, "tag_open", "tag_close");
}
+ function getGOsaUUID()
+ {
+ return($this->gosaUUID);
+ }
+
+
/*! \brief Check and reload the configuration
*
* This function checks if the configuration has changed, since it was
}
- function getRpcHandle()
+ function getRpcHandle($connectUrl="", $username="", $userPassword="", $authModeDigest=FALSE)
{
+ // Get conenct information, if no info was given use the default values from gosa.conf
+ $connectUrl = (!empty($connectUrl)) ? $connectUrl : $this->get_cfg_value('core','gosaRpcServer');
+ $username = (!empty($username)) ? $username : $this->get_cfg_value('core','gosaRpcUser');
+ $userPassword = (!empty($userPassword)) ? $userPassword : $this->get_cfg_value('core','gosaRpcPassword');
+ $authModeDigest = $authModeDigest;
+
// Create jsonRPC handle on demand.
- if(!$this->jsonRPChandle){
- $this->jsonRPChandle = new jsonRPC($this);
+ if(!isset($this->jsonRPChandle[$connectUrl][$username]) || !$this->jsonRPChandle[$connectUrl][$username]){
+ $this->jsonRPChandle[$connectUrl][$username] = new jsonRPC($this, $connectUrl, $username, $userPassword, $authModeDigest);
}
- return($this->jsonRPChandle);
+ return($this->jsonRPChandle[$connectUrl][$username]);
}