restored the db_system extends db_sql for backward compatibility, $db remains a db_sql()

This commit is contained in:
Fran��ois Serman 2014-06-26 09:48:22 +00:00
parent 3b656f15dc
commit 0c88edaf0f
1 changed files with 25 additions and 0 deletions

View File

@ -127,6 +127,31 @@ if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) {
header("Location: https://$L_FQDN/"); header("Location: https://$L_FQDN/");
} }
// Classe h<>rit<69>e de la classe db de la phplib.
/**
* Class for MySQL management in the bureau
*
* This class heriting from the db class of the phplib manages
* the connection to the MySQL database.
*/
class DB_system extends DB_Sql {
var $Host = null;
var $Database = null;
var $User = null;
var $Password = null;
/**
* Creator
*/
function DB_system() {
global $L_MYSQL_HOST,$L_MYSQL_DATABASE,$L_MYSQL_LOGIN,$L_MYSQL_PWD;
$this->Host = $L_MYSQL_HOST;
$this->Database = $L_MYSQL_DATABASE;
$this->User = $L_MYSQL_LOGIN;
$this->Password = $L_MYSQL_PWD;
}
}
$db= new DB_Sql($L_MYSQL_DATABASE, $L_MYSQL_HOST, $L_MYSQL_LOGIN, $L_MYSQL_PWD); $db= new DB_Sql($L_MYSQL_DATABASE, $L_MYSQL_HOST, $L_MYSQL_LOGIN, $L_MYSQL_PWD);