[-] BO : fixed image upload (except with OVH firewall) #PSCFV-6152 #PSCFV-6157 #PSCFV-5862 #PSCFV-5756 #PSCFV-6074 #PSCFV-5459
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user