// revert from r11699

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11702 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2011-12-22 21:56:00 +00:00
parent 16861c4d03
commit d2f89e79ba
19 changed files with 170 additions and 167 deletions
+5 -8
View File
@@ -238,13 +238,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'))
@@ -402,10 +401,8 @@ class ImageCore extends ObjectModel
// Delete auto-generated images
$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;
// delete index.php