From d8426b924190fe53a696df5fba9296111c8066de Mon Sep 17 00:00:00 2001 From: dMetzger Date: Thu, 4 Oct 2012 17:52:04 +0000 Subject: [PATCH] // Grumpf --- install-dev/upgrade/php/p15018_change_image_types.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/install-dev/upgrade/php/p15018_change_image_types.php b/install-dev/upgrade/php/p15018_change_image_types.php index 218b5e3ac..43685ac62 100644 --- a/install-dev/upgrade/php/p15018_change_image_types.php +++ b/install-dev/upgrade/php/p15018_change_image_types.php @@ -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); } \ No newline at end of file