// Fix install with Db

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8675 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie committed 2011-09-21 07:46:12 +00:00
1 parent 9641b3c55b
commit a3881668f0
4 files changed
+7 -7

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));
} }
/** /**
+4 -4
View File
@@ -47,17 +47,17 @@ 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{}');
} }
if($posted) if ($posted)
{ {
// Check POST data... // Check POST data...
$data_check = array( $data_check = array(
@@ -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;