|
From: FlorinCB <ory...@us...> - 2008-07-30 13:32:55
|
Update of /cvsroot/mxbb/core/includes/db In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21348 Modified Files: mysql.php mysql4.php mysqli.php Log Message: WE NEED PORTAL_BACKEND IN config.php Index: mysql.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysql.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mysql.php 20 Jul 2008 02:41:41 -0000 1.16 --- mysql.php 30 Jul 2008 13:32:52 -0000 1.17 *************** *** 62,67 **** if (version_compare($this->mysql_version, '4.1.3', '>=')) { ! @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); ! // enforce strict mode on databases that support it if (version_compare($this->mysql_version, '5.0.2', '>=')) { --- 62,70 ---- if (version_compare($this->mysql_version, '4.1.3', '>=')) { ! if (PORTAL_BACKEND === 'phpbb3') ! { ! @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); ! // enforce strict mode on databases that support it ! } if (version_compare($this->mysql_version, '5.0.2', '>=')) { Index: mysql4.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysql4.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mysql4.php 20 Jul 2008 23:34:14 -0000 1.17 --- mysql4.php 30 Jul 2008 13:32:52 -0000 1.18 *************** *** 54,59 **** $this->dbname = $database; - $this->sql_layer = 'mysql4'; - $this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link); --- 54,57 ---- *************** *** 67,72 **** if (version_compare($this->mysql_version, '4.1.3', '>=')) { ! @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); ! // enforce strict mode on databases that support it if (version_compare($this->mysql_version, '5.0.2', '>=')) --- 65,75 ---- if (version_compare($this->mysql_version, '4.1.3', '>=')) { ! $this->sql_layer = 'mysql4'; ! ! if (PORTAL_BACKEND === 'phpbb3') ! { ! @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); ! // enforce strict mode on databases that support it ! } if (version_compare($this->mysql_version, '5.0.2', '>=')) *************** *** 96,103 **** } ! else if (version_compare($this->mysql_version, '4.0.0', '<')) { ! $this->sql_layer = 'mysql'; } return $this->db_connect_id; --- 99,110 ---- } ! else if (version_compare($this->mysql_version, '4.0.0', '>=')) { ! $this->sql_layer = 'mysql4'; } + else //if (version_compare($this->mysql_version, '4.0.0', '<')) + { + $this->sql_layer = 'mysql'; + } return $this->db_connect_id; *************** *** 107,111 **** return $this->sql_error(''); } ! /** * Version information about used database --- 114,118 ---- return $this->sql_error(''); } ! /** * Version information about used database Index: mysqli.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysqli.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mysqli.php 20 Jul 2008 02:41:41 -0000 1.16 --- mysqli.php 30 Jul 2008 13:32:52 -0000 1.17 *************** *** 54,59 **** if ($this->db_connect_id && $this->dbname != '') { ! @mysqli_query($this->db_connect_id, "SET NAMES 'utf8'"); ! // enforce strict mode on databases that support it if (mysqli_get_server_version($this->db_connect_id) >= 50002) { --- 54,62 ---- if ($this->db_connect_id && $this->dbname != '') { ! if (PORTAL_BACKEND === 'phpbb3') ! { ! @mysqli_query($this->db_connect_id, "SET NAMES 'utf8'"); ! // enforce strict mode on databases that support it ! } if (mysqli_get_server_version($this->db_connect_id) >= 50002) { |