// Fix install with Db

This commit is contained in:
rMalie committed 2011-09-21 07:46:12 +00:00
1 parent be0176a514
commit 8c8eb83239
4 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -511,7 +511,7 @@ abstract class DbCore
*/ */
static public function checkEncoding($server, $user, $pwd) static public function checkEncoding($server, $user, $pwd)
{ {
return call_user_func_array(array(Db::getClass(), 'tryToConnect'), array($server, $user, $pwd)); return call_user_func_array(array(Db::getClass(), 'tryUTF8'), array($server, $user, $pwd));
} }
/** /**
+3 -3
View File
@@ -47,13 +47,13 @@ class ToolsInstall
if (!class_exists('Db', false)) if (!class_exists('Db', false))
{ {
include_once(INSTALL_PATH.'/../classes/Db.php'); include_once(INSTALL_PATH.'/../classes/db/Db.php');
eval('abstract class Db extends DbCore{}'); eval('abstract class Db extends DbCore{}');
} }
if (!class_exists('MySQL', false)) if (!class_exists('MySQL', false))
{ {
include_once(INSTALL_PATH.'/../classes/MySQL.php'); include_once(INSTALL_PATH.'/../classes/db/MySQL.php');
eval('class MySQL extends MySQLCore{}'); eval('class MySQL extends MySQLCore{}');
} }
@@ -77,7 +77,7 @@ class ToolsInstall
switch (Db::checkConnection(trim($srv), trim($login), trim($password), trim($name))) switch (Db::checkConnection(trim($srv), trim($login), trim($password), trim($name)))
{ {
case 0: case 0:
if (MySQL::tryUTF8(trim($srv), trim($login), trim($password))) if (Db::checkEncoding(trim($srv), trim($login), trim($password)))
return true; return true;
return 49; return 49;
break; break;
+1 -1
View File
@@ -32,7 +32,7 @@ define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
require_once(INSTALL_PATH.'/classes/AddConfToFile.php'); require_once(INSTALL_PATH.'/classes/AddConfToFile.php');
require_once(INSTALL_PATH.'/../classes/Validate.php'); require_once(INSTALL_PATH.'/../classes/Validate.php');
require_once(INSTALL_PATH.'/../classes/Db.php'); require_once(INSTALL_PATH.'/../classes/db/Db.php');
require_once(INSTALL_PATH.'/../classes/Tools.php'); require_once(INSTALL_PATH.'/../classes/Tools.php');
require_once(INSTALL_PATH.'/../config/settings.inc.php'); require_once(INSTALL_PATH.'/../config/settings.inc.php');
+1 -1
View File
@@ -38,7 +38,7 @@ if (file_exists(SETTINGS_FILE))
require_once(INSTALL_PATH.'/classes/AddConfToFile.php'); require_once(INSTALL_PATH.'/classes/AddConfToFile.php');
require_once(INSTALL_PATH.'/../classes/Validate.php'); require_once(INSTALL_PATH.'/../classes/Validate.php');
require_once(INSTALL_PATH.'/../classes/Db.php'); require_once(INSTALL_PATH.'/../classes/db/Db.php');
require_once(INSTALL_PATH.'/../classes/Tools.php'); require_once(INSTALL_PATH.'/../classes/Tools.php');
global $logger; global $logger;