From 6558c0f1f24bc5688b4bdab5606bce30c2632583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 19:47:15 +0200 Subject: [PATCH] Removed a bunch of unused variables --- htdocs/core/db/mssql.class.php | 2 +- htdocs/core/db/sqlite.class.php | 8 +++----- htdocs/core/db/sqlite3.class.php | 4 +--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index b097ee6f759..1c9b8f97ba6 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -57,7 +57,7 @@ class DoliDBMssql extends DoliDB */ function __construct($type, $host, $user, $pass, $name='', $port=0) { - global $conf,$langs; + global $langs; $this->database_user=$user; $this->database_host=$host; diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index a7852c18333..d4762da4e96 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -54,7 +54,7 @@ class DoliDBSqlite extends DoliDB */ function __construct($type, $host, $user, $pass, $name='', $port=0) { - global $conf,$langs; + global $conf; // Note that having "static" property for "$forcecharset" and "$forcecollate" will make error here in strict mode, so they are not static if (! empty($conf->db->character_set)) $this->forcecharset=$conf->db->character_set; @@ -303,7 +303,7 @@ class DoliDBSqlite extends DoliDB */ function connect($host, $login, $passwd, $name, $port=0) { - global $conf,$main_data_dir; + global $main_data_dir; dol_syslog(get_class($this)."::connect name=".$name,LOG_DEBUG); @@ -379,9 +379,7 @@ class DoliDBSqlite extends DoliDB */ function query($query,$usesavepoint=0,$type='auto') { - $errmsg=''; - - $ret=''; + $ret=null; $query = trim($query); $this->error = 0; diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index 67d83ee8307..d40aed006dc 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -323,7 +323,7 @@ class DoliDBSqlite3 extends DoliDB */ function connect($host, $login, $passwd, $name, $port=0) { - global $conf,$main_data_dir; + global $main_data_dir; dol_syslog(get_class($this)."::connect name=".$name,LOG_DEBUG); @@ -401,8 +401,6 @@ class DoliDBSqlite3 extends DoliDB */ function query($query,$usesavepoint=0,$type='auto') { - $errmsg=''; - $ret=null; $query = trim($query); $this->error = 0;