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