From 05654f808cb1bf74fb203c4f35c23e54bb42c96d Mon Sep 17 00:00:00 2001 From: dMetzger Date: Mon, 1 Oct 2012 13:03:38 +0000 Subject: [PATCH] // #PSCFV-4530 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17643 b9a71923-0436-4b27-9f14-aed3839534dd --- .../upgrade/php/p15018_change_image_types.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/install-dev/upgrade/php/p15018_change_image_types.php b/install-dev/upgrade/php/p15018_change_image_types.php index 3ebd88bdd..00dd27898 100644 --- a/install-dev/upgrade/php/p15018_change_image_types.php +++ b/install-dev/upgrade/php/p15018_change_image_types.php @@ -82,23 +82,8 @@ function p15018_change_image_types() ); } - foreach (scandir(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p') as $file) - { - if (!preg_match('/^[a-z]{2}\-[a-z_-]+\.jpg$/i', $file)) - continue; - foreach ($replace_types['products'] as $old_type => $new_type) - if (preg_match('/^([a-z]{2})\-'.$old_type.'\.jpg$/i', $file, $matches)) - { - p15018_copy_or_rename( - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$directory.DIRECTORY_SEPARATOR.$matches[1].'-'.$old_type.'.jpg', - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$directory.DIRECTORY_SEPARATOR.$matches[1].'-'.$new_type.'.jpg', - $option - ); - } - } - // Then the other entities (if there is less than 500 products, that should not be a problem) - $directories = array('c', 'm', 's', 'scenes', 'scenes'.DIRECTORY_SEPARATOR.'thumbs', 'st'); + $directories = array('p', 'c', 'm', 's', 'scenes', 'scenes'.DIRECTORY_SEPARATOR.'thumbs', 'st'); foreach ($directories as $directory) foreach (scandir(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$directory) as $file) {