// Grumpf

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17780 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-10-04 17:52:04 +00:00
parent fcce4d7bd1
commit e8f0c50c21
@@ -49,8 +49,8 @@ function p15018_change_image_types()
foreach ($replace_types as $type => $type_array)
foreach ($type_array as $old_type => $new_type)
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'image_type` (
SELECT "'.$new_type.'", width, height, products, categories, manufacturers, suppliers, scenes, stores
FROM `'._DB_PREFIX_.'image_type` WHERE name = "'.$old_type.'" LIMIT 1');
SELECT NULL, "'.$new_type.'", width, height, products, categories, manufacturers, suppliers, scenes, stores
FROM `'._DB_PREFIX_.'image_type` WHERE name = "'.$old_type.'" LIMIT 1)');
// But if there is only the default one, we can update de names
else
foreach ($replace_types as $type => $type_array)
@@ -107,10 +107,8 @@ function p15018_change_image_types()
function p15018_copy_or_rename($from, $to, $option)
{
if (!file_exists($from))
return;
if ($option)
copy($from, $to);
@copy($from, $to);
else
rename($from, $to);
@rename($from, $to);
}