// Finish removing the "id_theme in ImageType" code

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13265 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-02-13 15:35:05 +00:00
parent abd765096a
commit 54080062f7
8 changed files with 20 additions and 25 deletions
+4 -3
View File
@@ -72,13 +72,13 @@ class AdminScenesControllerCore extends AdminController
if ($obj->id && (isset($_FILES['image']) || isset($_FILES['thumb'])))
{
$images_types = ImageType::getImagesTypes('scenes');
foreach ($images_types as $k => $image_type)
{
$theme = (Shop::isFeatureActive() ? '-'.$image_type['id_theme'] : '');
if ($image_type['name'] == 'large_scene' && isset($_FILES['image']))
ImageManager::resize(
$_FILES['image']['tmp_name'],
_PS_SCENE_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).$theme.'.jpg',
_PS_SCENE_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).'.jpg',
(int)$image_type['width'],
(int)$image_type['height']
);
@@ -90,13 +90,14 @@ class AdminScenesControllerCore extends AdminController
$tmp_name = $_FILES['image']['tmp_name'];
ImageManager::resize(
$tmp_name,
_PS_SCENE_THUMB_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).$theme.'.jpg',
_PS_SCENE_THUMB_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).'.jpg',
(int)$image_type['width'],
(int)$image_type['height']
);
}
}
}
return true;
}