[-] BO : fix #PSCFV-3190

This commit is contained in:
lLefevre committed 2012-07-18 13:03:06 +00:00
1 parent 5593b5be26
commit 88c3aae892
2 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ class ImageManagerCore
*/ */
public static function checkImageMemoryLimit($image) public static function checkImageMemoryLimit($image)
{ {
$infos = getimagesize($image); $infos = @getimagesize($image);
$memory_limit = Tools::getMemoryLimit(); $memory_limit = Tools::getMemoryLimit();
// memory_limit == -1 => unlimited memory // memory_limit == -1 => unlimited memory
+6 -6
View File
@@ -1504,18 +1504,18 @@ class AdminImportControllerCore extends AdminController
foreach (explode($fsep, $info['group']) as $key => $group) foreach (explode($fsep, $info['group']) as $key => $group)
{ {
$tab_group = explode(':', $group); $tab_group = explode(':', $group);
$group = $tab_group[0]; $group = trim($tab_group[0]);
if (!isset($tab_group[1])) if (!isset($tab_group[1]))
$type = 'select'; $type = 'select';
else else
$type = $tab_group[1]; $type = trim($tab_group[1]);
// sets group // sets group
$groups_attributes[$key]['group'] = $group; $groups_attributes[$key]['group'] = $group;
// if position is filled // if position is filled
if (isset($tab_group[2])) if (isset($tab_group[2]))
$position = $tab_group[2]; $position = trim($tab_group[2]);
else else
$position = false; $position = false;
@@ -1558,10 +1558,10 @@ class AdminImportControllerCore extends AdminController
foreach (explode($fsep, $info['attribute']) as $key => $attribute) foreach (explode($fsep, $info['attribute']) as $key => $attribute)
{ {
$tab_attribute = explode(':', $attribute); $tab_attribute = explode(':', $attribute);
$attribute = $tab_attribute[0]; $attribute = trim($tab_attribute[0]);
// if position is filled // if position is filled
if (isset($tab_attribute[1])) if (isset($tab_attribute[1]))
$position = $tab_attribute[1]; $position = trim($tab_attribute[1]);
else else
$position = false; $position = false;
@@ -2531,7 +2531,7 @@ class AdminImportControllerCore extends AdminController
} }
} }
else if (!file_exists($_FILES['file']['tmp_name']) || else if (!file_exists($_FILES['file']['tmp_name']) ||
!@move_uploaded_file($_FILES['file']['tmp_name'], _PS_ADMIN_DIR_.'/import/'.$_FILES['file']['name'].'.'.date('Ymdhis'))) !@move_uploaded_file($_FILES['file']['tmp_name'], _PS_ADMIN_DIR_.'/import/'.date('Ymdhis').'-'.$_FILES['file']['name']))
$this->errors[] = $this->l('an error occurred while uploading and copying file'); $this->errors[] = $this->l('an error occurred while uploading and copying file');
else else
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=18'); Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=18');