Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release
This commit is contained in:
@@ -162,14 +162,13 @@ class QqUploadedFileXhr
|
||||
public function upload($path)
|
||||
{
|
||||
$input = fopen('php://input', 'r');
|
||||
$temp = tmpfile();
|
||||
$realSize = stream_copy_to_stream($input, $temp);
|
||||
fclose($input);
|
||||
$target = fopen($path, 'w');
|
||||
|
||||
$realSize = stream_copy_to_stream($input, $target);
|
||||
if ($realSize != $this->getSize())
|
||||
return false;
|
||||
$target = fopen($path, 'w');
|
||||
fseek($temp, 0, SEEK_SET);
|
||||
stream_copy_to_stream($temp, $target);
|
||||
|
||||
fclose($input);
|
||||
fclose($target);
|
||||
|
||||
return true;
|
||||
|
||||
+2
-2
@@ -3219,8 +3219,8 @@ class ProductCore extends ObjectModel
|
||||
{
|
||||
if (!array_key_exists($row['id_product'].'-'.$id_lang, self::$_frontFeaturesCache))
|
||||
self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang] = array();
|
||||
if (!isset(self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_product']]))
|
||||
self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_product']] = $row;
|
||||
if (!isset(self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_feature']]))
|
||||
self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_feature']] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -638,20 +638,20 @@ class AdminImportControllerCore extends AdminController
|
||||
if (empty($field))
|
||||
return array();
|
||||
|
||||
if (is_null(Tools::getValue('multiple_value_separator')) || trim(Tools::getValue('multiple_value_separator')) == '')
|
||||
$separator = Tools::getValue('multiple_value_separator');
|
||||
if (is_null($separator) || trim($separator) == '')
|
||||
$separator = ',';
|
||||
else
|
||||
$separator = Tools::getValue('multiple_value_separator');
|
||||
|
||||
$temp = tmpfile();
|
||||
fwrite($temp, $field);
|
||||
rewind($temp);
|
||||
$tab = fgetcsv($temp, MAX_LINE_SIZE, $separator);
|
||||
fclose($temp);
|
||||
do $uniqid = uniqid(); while (file_exists(_PS_UPLOAD_DIR_.$uniqid));
|
||||
$tmp_file = file_put_contents(_PS_UPLOAD_DIR_.$uniqid, $field);
|
||||
$fd = fopen($temp, 'r');
|
||||
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
||||
fclose($fd);
|
||||
unlink($tmp_file);
|
||||
|
||||
if (empty($tab) || (!is_array($tab)))
|
||||
return array();
|
||||
return $tab;
|
||||
|
||||
}
|
||||
|
||||
protected static function createMultiLangField($field)
|
||||
|
||||
@@ -20,4 +20,6 @@ DELETE FROM `PREFIX_configuration` WHERE `name`= 'PS_HIGH_HTML_THEME_COMPRESSION
|
||||
|
||||
INSERT INTO `PREFIX_configuration`(`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_MAIL_COLOR', '#db3484', NOW(), NOW());
|
||||
|
||||
ALTER TABLE `PREFIX_order_cart_rule` CHANGE `name` `name` VARCHAR(254);
|
||||
ALTER TABLE `PREFIX_order_cart_rule` CHANGE `name` `name` VARCHAR(254);
|
||||
|
||||
ALTER TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
|
||||
|
||||
Reference in New Issue
Block a user