From 5cedf071709ab02e989714530e9c54ccd07dc4f4 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Wed, 8 Aug 2012 16:38:26 +0000 Subject: [PATCH] // Fixed upgrade bug (wrong db function used) --- install-dev/upgrade/php/drop_image_type_non_unique_index.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install-dev/upgrade/php/drop_image_type_non_unique_index.php b/install-dev/upgrade/php/drop_image_type_non_unique_index.php index ad6e0ec4b..b686e5124 100644 --- a/install-dev/upgrade/php/drop_image_type_non_unique_index.php +++ b/install-dev/upgrade/php/drop_image_type_non_unique_index.php @@ -27,8 +27,7 @@ function drop_image_type_non_unique_index() { - $index = Db::getInstance()->executeS('SHOW index FROM `'._DB_PREFIX_.'image_type` where column_name = "name" and non_unique=1'); - // do not use pSql, this function is not defined - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'image_type` DROP INDEX "'.$index.'"'); + $index = Db::getInstance()->getValue('SHOW index FROM `'._DB_PREFIX_.'image_type` where column_name = "name" and non_unique=1'); + Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'image_type` DROP INDEX "'.pSQL($index).'"'); }