[-] BO : fixed import images
This commit is contained in:
@@ -642,12 +642,12 @@ class AdminImportControllerCore extends AdminController
|
||||
if (is_null($separator) || trim($separator) == '')
|
||||
$separator = ',';
|
||||
|
||||
do $uniqid = uniqid(); while (file_exists(_PS_UPLOAD_DIR_.$uniqid));
|
||||
$tmp_file = file_put_contents(_PS_UPLOAD_DIR_.$uniqid, $field);
|
||||
$fd = fopen($temp, 'r');
|
||||
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
|
||||
file_put_contents($uniqid_path, $field);
|
||||
$fd = fopen($uniqid_path, 'r');
|
||||
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
||||
fclose($fd);
|
||||
unlink($tmp_file);
|
||||
unlink($uniqid_path);
|
||||
|
||||
if (empty($tab) || (!is_array($tab)))
|
||||
return array();
|
||||
|
||||
Reference in New Issue
Block a user