From 0891c986d6b95d05052af3bd420e515cbd664e57 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 3 Sep 2013 17:43:33 +0200 Subject: [PATCH] // fix from comment https://github.com/PrestaShop/PrestaShop/commit/c6d2e1252e1757478339009ec7b48320b1ccd92ahttps://github.com/PrestaShop/PrestaShop/commit/c6d2e1252e1757478339009ec7b48320b1ccd92a#commitcomment-4002919 --- install-dev/upgrade/php/block_category_1521.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-dev/upgrade/php/block_category_1521.php b/install-dev/upgrade/php/block_category_1521.php index a132475ed..4ff4d086b 100644 --- a/install-dev/upgrade/php/block_category_1521.php +++ b/install-dev/upgrade/php/block_category_1521.php @@ -26,11 +26,11 @@ function block_category_1521() { - if (!Db::getInstance()->getValue('SELECT FROM `'._DB_PREFIX_.'configuration` WHERE `name` LIKE \'BLOCK_CATEG_MAX_DEPTH\' ')) + if (!Db::getInstance()->getValue('SELECT value FROM `'._DB_PREFIX_.'configuration` WHERE `name` LIKE \'BLOCK_CATEG_MAX_DEPTH\' ')) Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration` ,`id_shop_group` ,`id_shop` ,`name` ,`value` ,`date_add` ,`date_upd`) VALUES (NULL, NULL, NULL, \'BLOCK_CATEG_MAX_DEPTH\', 4, NOW(), NOW())'); - else if ($maxdepth = (int)Db::getInstance()->getValue('SELECT FROM `'._DB_PREFIX_.'configuration` WHERE `value` IS NOT NULL AND `value` <> 0')) + else if ($maxdepth = (int)Db::getInstance()->getValue('SELECT value FROM `'._DB_PREFIX_.'configuration` WHERE `value` IS NOT NULL AND `value` <> 0 AND `name` LIKE \'BLOCK_CATEG_MAX_DEPTH\'')) Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = '.($maxdepth + 1).' WHERE `name` LIKE \'BLOCK_CATEG_MAX_DEPTH\''); } \ No newline at end of file