// Remove some other mysql_ in code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7652 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -160,7 +160,7 @@ class AdminInformation extends AdminTab
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>'.$this->l('MySQL Version').':</b>
|
<b>'.$this->l('MySQL Version').':</b>
|
||||||
'.mysql_get_server_info().'
|
'.Db::getInstance()->getVersion().'
|
||||||
</p>';
|
</p>';
|
||||||
if (function_exists('apache_get_modules') AND in_array('mod_instaweb', apache_get_modules()))
|
if (function_exists('apache_get_modules') AND in_array('mod_instaweb', apache_get_modules()))
|
||||||
echo '<p style="color:red;font-weight:700">'.$this->l('PageSpeed module for Apache installed (mod_instaweb)').'</p>';
|
echo '<p style="color:red;font-weight:700">'.$this->l('PageSpeed module for Apache installed (mod_instaweb)').'</p>';
|
||||||
|
|||||||
+1
-1
@@ -205,7 +205,7 @@ class BackupCore
|
|||||||
|
|
||||||
foreach ($row AS $field => $value)
|
foreach ($row AS $field => $value)
|
||||||
{
|
{
|
||||||
$tmp = "'" . mysql_real_escape_string($value) . "',";
|
$tmp = "'" . pSQL($value) . "',";
|
||||||
if($tmp != "'',")
|
if($tmp != "'',")
|
||||||
$s .= $tmp;
|
$s .= $tmp;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -243,6 +243,13 @@ abstract class DbCore
|
|||||||
*/
|
*/
|
||||||
abstract public function nextRow($result = false);
|
abstract public function nextRow($result = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get database version
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
abstract public function getVersion();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Alias of Db::getInstance()->ExecuteS
|
* Alias of Db::getInstance()->ExecuteS
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -260,6 +260,14 @@ class MySQLCore extends Db
|
|||||||
die(Tools::displayError((mysql_error())));
|
die(Tools::displayError((mysql_error())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see DbCore::getVersion()
|
||||||
|
*/
|
||||||
|
public function getVersion()
|
||||||
|
{
|
||||||
|
return mysql_get_server_info();
|
||||||
|
}
|
||||||
|
|
||||||
static public function tryToConnect($server, $user, $pwd, $db)
|
static public function tryToConnect($server, $user, $pwd, $db)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -732,7 +732,7 @@ class MondialRelay extends Module
|
|||||||
|
|
||||||
Db::getInstance()->Execute($query);
|
Db::getInstance()->Execute($query);
|
||||||
|
|
||||||
$mainInsert = mysql_insert_id();
|
$mainInsert = Db::getInstance()->Insert_ID();
|
||||||
$default = Db::getInstance()->ExecuteS("SELECT * FROM " . _DB_PREFIX_ . "configuration WHERE name = 'PS_CARRIER_DEFAULT'");
|
$default = Db::getInstance()->ExecuteS("SELECT * FROM " . _DB_PREFIX_ . "configuration WHERE name = 'PS_CARRIER_DEFAULT'");
|
||||||
$check = Db::getInstance()->ExecuteS("SELECT * FROM " . _DB_PREFIX_ . "carrier");
|
$check = Db::getInstance()->ExecuteS("SELECT * FROM " . _DB_PREFIX_ . "carrier");
|
||||||
$checkD = array();
|
$checkD = array();
|
||||||
@@ -756,7 +756,7 @@ class MondialRelay extends Module
|
|||||||
(`url`, `name`, `active`, `is_module`, `range_behavior`)
|
(`url`, `name`, `active`, `is_module`, `range_behavior`)
|
||||||
VALUES(NULL, "'.pSQL('mondialrelay').'", "1", "1", "1")');
|
VALUES(NULL, "'.pSQL('mondialrelay').'", "1", "1", "1")');
|
||||||
|
|
||||||
$get = Db::getInstance()->getRow('SELECT * FROM `' . _DB_PREFIX_ . 'carrier` WHERE `id_carrier` = "' . mysql_insert_id() . '"');
|
$get = Db::getInstance()->getRow('SELECT * FROM `' . _DB_PREFIX_ . 'carrier` WHERE `id_carrier` = "' . Db::getInstance()->Insert_ID() . '"');
|
||||||
Db::getInstance()->Execute('UPDATE `' . _DB_PREFIX_ . 'mr_method` SET `id_carrier` = "' . (int)($get['id_carrier']) . '" WHERE `id_mr_method` = "' . pSQL($mainInsert) . '"');
|
Db::getInstance()->Execute('UPDATE `' . _DB_PREFIX_ . 'mr_method` SET `id_carrier` = "' . (int)($get['id_carrier']) . '" WHERE `id_mr_method` = "' . pSQL($mainInsert) . '"');
|
||||||
$weight_coef = Configuration::get('MR_WEIGHT_COEF');
|
$weight_coef = Configuration::get('MR_WEIGHT_COEF');
|
||||||
$range_weight = array('24R' => array(0, 20000 / $weight_coef), 'DRI' => array(20000 / $weight_coef, 130000 / $weight_coef), 'LD1' => array(0, 60000 / $weight_coef), 'LDS' => array(30000 / $weight_coef, 130000 / $weight_coef));
|
$range_weight = array('24R' => array(0, 20000 / $weight_coef), 'DRI' => array(20000 / $weight_coef, 130000 / $weight_coef), 'LD1' => array(0, 60000 / $weight_coef), 'LDS' => array(30000 / $weight_coef, 130000 / $weight_coef));
|
||||||
|
|||||||
Reference in New Issue
Block a user