V1.4.0 released: Upsell feature, New Product Page, New Stats Module, Security fixes

This commit is contained in:
Rohit Jain
2019-06-28 18:41:13 +05:30
parent 102343d2c0
commit b5d5bd7129
3884 changed files with 124528 additions and 70020 deletions

View File

@@ -1,6 +1,6 @@
<?php
/**
* 2007-2015 PrestaShop
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @copyright 2007-2017 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
@@ -145,8 +145,8 @@ class ConfigurationCore extends ObjectModel
FROM `'._DB_PREFIX_.bqSQL(self::$definition['table']).'` c
LEFT JOIN `'._DB_PREFIX_.bqSQL(self::$definition['table']).'_lang` cl ON (c.`'.bqSQL(self::$definition['primary']).'` = cl.`'.bqSQL(self::$definition['primary']).'`)';
$db = Db::getInstance();
$result = $db->executeS($sql, false);
while ($row = $db->nextRow($result)) {
$rows = (array) $db->executeS($sql);
foreach ($rows as $row) {
$lang = ($row['id_lang']) ? $row['id_lang'] : 0;
self::$types[$row['name']] = ($lang) ? 'lang' : 'normal';
if (!isset(self::$_cache[self::$definition['table']][$lang])) {
@@ -324,7 +324,7 @@ class ConfigurationCore extends ObjectModel
public static function set($key, $values, $id_shop_group = null, $id_shop = null)
{
if (!Validate::isConfigName($key)) {
die(sprintf(Tools::displayError('[%s] is not a valid configuration key'), $key));
die(sprintf(Tools::displayError('[%s] is not a valid configuration key'), Tools::htmlentitiesUTF8($key)));
}
if ($id_shop === null) {
@@ -379,7 +379,7 @@ class ConfigurationCore extends ObjectModel
public static function updateValue($key, $values, $html = false, $id_shop_group = null, $id_shop = null)
{
if (!Validate::isConfigName($key)) {
die(sprintf(Tools::displayError('[%s] is not a valid configuration key'), $key));
die(sprintf(Tools::displayError('[%s] is not a valid configuration key'), Tools::htmlentitiesUTF8($key)));
}
if ($id_shop === null || !Shop::isFeatureActive()) {
@@ -443,7 +443,7 @@ class ConfigurationCore extends ObjectModel
'date_add' => $now,
'date_upd' => $now,
);
$result &= Db::getInstance()->insert('configuration', $data, true);
$result &= Db::getInstance()->insert(self::$definition['table'], $data, true);
$configID = Db::getInstance()->Insert_ID();
}