diff -r 7e8fd44b36b0 -r dc8741857bde upgrade.php --- a/upgrade.php Thu Jun 28 13:49:40 2007 -0400 +++ b/upgrade.php Thu Jun 28 15:26:40 2007 -0400 @@ -76,8 +76,9 @@ ); $this_version = '1.0'; $func_list = Array( - '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text') // , + '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text'), // , // '1.0RC2' => Array('u_1_0_populate_userpage_comments') + '1.0RC3' => Array('u_1_0_RC3_make_users_extra') ); if(!isset($_GET['mode'])) @@ -368,6 +369,26 @@ */ } +function u_1_0_RC3_make_users_extra() +{ + global $db; + $q = $db->sql_query('SELECT user_id FROM users WHERE user_id > 1;'); + if ( !$q ) + $db->_die(); + + $ids = array(); + while ( $row = $db->fetchrow() ) + { + $ids[] = intval($row['user_id']); + } + + $ids = '(' . implode('),(', $ids) . ')'; + $sql = "INSERT INTO " . table_prefix . "users_extra(user_id) VALUES$ids;"; + + if ( !$db->sql_query($sql) ) + $db->_die(); +} + switch($_GET['mode']) { case "login":