// 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 -6
View File
@@ -233,13 +233,12 @@ class ImageCore extends ObjectModel
$new_path = $image_new->getPathForCreation();
foreach ($images_types as $image_type)
{
$theme = (Shop::isFeatureActive() ? '-'.$image_type['id_theme'] : '');
if (file_exists(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'-'.$image_type['name'].$theme.'.jpg'))
if (file_exists(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'-'.$image_type['name'].'.jpg'))
{
if (!Configuration::get('PS_LEGACY_IMAGES'))
$image_new->createImgFolder();
copy(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'-'.$image_type['name'].$theme.'.jpg',
$new_path.'-'.$image_type['name'].$theme.'.jpg');
copy(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'-'.$image_type['name'].'.jpg',
$new_path.'-'.$image_type['name'].'.jpg');
}
}
if (file_exists(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'.jpg'))
@@ -398,8 +397,7 @@ class ImageCore extends ObjectModel
$image_types = ImageType::getImagesTypes();
foreach ($image_types as $image_type)
{
$theme = (Shop::isFeatureActive() ? '-'.$image_type['id_theme'] : '');
$files_to_delete[] = $this->image_dir.$this->getExistingImgPath().'-'.$image_type['name'].$theme.'.'.$this->image_format;
$files_to_delete[] = $this->image_dir.$this->getExistingImgPath().'-'.$image_type['name'].'.'.$this->image_format;
}
// Delete watermark image
$files_to_delete[] = $this->image_dir.$this->getExistingImgPath().'-watermark.'.$this->image_format;