// adding configuration when upgrade to the three new groups

This commit is contained in:
vChabot
2011-12-06 14:43:39 +00:00
parent e17e275303
commit 21e210fe0b
+6 -1
View File
@@ -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())');
}