/** * Constructor * * @param $ID ID of the ocs server ID **/ function __construct($dbhost, $dbuser, $dbpassword, $dbdefault) { $this->dbhost = $dbhost; $this->dbuser = $dbuser; $this->dbpassword = $dbpassword; $this->dbdefault = $dbdefault; parent::__construct(); }
/** * Constructor * * @param $ID ID of the ocs server ID **/ function __construct($ID) { $this->ocsservers_id = $ID; $data = PluginOcsinventoryngOcsServer::getConfig($ID); $this->dbhost = $data["ocs_db_host"]; $this->dbuser = $data["ocs_db_user"]; $this->dbpassword = rawurldecode($data["ocs_db_passwd"]); $this->dbdefault = $data["ocs_db_name"]; $this->dbenc = $data["ocs_db_utf8"] ? "utf8" : "latin1"; parent::__construct(); }
/** * Constructor * * @param $ID ID of the ocs server ID **/ function __construct($ID) { global $CFG_GLPI; $this->ocsservers_id = $ID; if ($CFG_GLPI["use_ocs_mode"]) { $data = OcsServer::getConfig($ID); $this->dbhost = $data["ocs_db_host"]; $this->dbuser = $data["ocs_db_user"]; $this->dbpassword = rawurldecode($data["ocs_db_passwd"]); $this->dbdefault = $data["ocs_db_name"]; $this->dbenc = $data["ocs_db_utf8"] ? "utf8" : "latin1"; parent::__construct(); } }