From a0f69ae3981a963d4e8608f3cf83a276b52ebcaf Mon Sep 17 00:00:00 2001 From: vChabot Date: Tue, 6 Dec 2011 14:43:39 +0000 Subject: [PATCH] // adding configuration when upgrade to the three new groups git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10991 b9a71923-0436-4b27-9f14-aed3839534dd --- install-dev/php/add_new_groups.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install-dev/php/add_new_groups.php b/install-dev/php/add_new_groups.php index 7486becef..cae35e5be 100644 --- a/install-dev/php/add_new_groups.php +++ b/install-dev/php/add_new_groups.php @@ -37,5 +37,10 @@ function add_new_groups($french, $standard) else $sql .= '('.(int)$last_id.', '.(int)$lang['id_lang'].', "'.pSQL($standard).'"),'; $sql = substr($sql, 0, strlen($sql) - 1); - DB::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'group_lang` (`id_group`, `id_lang`, `name`) VALUES '.$sql); + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'group_lang` (`id_group`, `id_lang`, `name`) VALUES '.$sql); + // we add the different id_group in the configuration + if (strtolower($standard) == 'unidentified') + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd) VALUES (NULL, "PS_UNIDENTIFIED_GROUP", "'.(int)$last_id.'", NOW(), NOW())'); + else if (strtolower($standard) == 'guest') + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd) VALUES (NULL, "PS_GUEST_GROUP", "'.(int)$last_id.'", NOW(), NOW())'); } \ No newline at end of file