[-] Installer : Missing directory separator when upgrading images types

This commit is contained in:
gRoussac
2013-04-02 14:36:22 +02:00
parent 206fc5cfa5
commit 404d60f877
@@ -72,7 +72,7 @@ function p15018_change_image_types()
$option
);
$folder = implode(DIRECTORY_SEPARATOR, str_split((string)$row['id_image'])).DIRECTORY_SEPARATOR;
if (file_exists(_PS_ROOT_DIR_.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'.jpg'))
if (file_exists(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'.jpg'))
foreach ($replace_types['products'] as $old_type => $new_type)
p15018_copy_or_rename(
_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'-'.$old_type.'.jpg',