Skip to content

Commit

Permalink
Updating the install script to use the proper IP address, and the def…
Browse files Browse the repository at this point in the history
…ault language and style for the admin user rather than always English.
  • Loading branch information
reines committed Jan 21, 2011
1 parent df7241d commit 96ab312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.php
Expand Up @@ -1554,7 +1554,7 @@ function process_form(the_form)
$db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email) VALUES(3, \''.$db->escape($lang_install['Guest']).'\', \''.$db->escape($lang_install['Guest']).'\', \''.$db->escape($lang_install['Guest']).'\')')
or error('Unable to add guest user. Please check your configuration and try again', __FILE__, __LINE__, $db->error());

$db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, \''.$db->escape($username).'\', \''.pun_hash($password1).'\', \''.$email.'\', 1, '.$now.', '.$now.', \'127.0.0.1\', '.$now.')')
$db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email, language, style, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, \''.$db->escape($username).'\', \''.pun_hash($password1).'\', \''.$email.'\', \''.$db->escape($default_lang).'\', \''.$db->escape($default_style).'\', 1, '.$now.', '.$now.', \''.get_remote_address().'\', '.$now.')')
or error('Unable to add administrator user. Please check your configuration and try again', __FILE__, __LINE__, $db->error());

// Enable/disable avatars depending on file_uploads setting in PHP configuration
Expand Down Expand Up @@ -1666,7 +1666,7 @@ function process_form(the_form)
$db->query('INSERT INTO '.$db_prefix.'topics (poster, subject, posted, first_post_id, last_post, last_post_id, last_poster, forum_id) VALUES(\''.$db->escape($username).'\', \''.$db->escape($subject).'\', '.$now.', 1, '.$now.', 1, \''.$db->escape($username).'\', 1)')
or error('Unable to insert into table '.$db_prefix.'topics. Please check your configuration and try again', __FILE__, __LINE__, $db->error());

$db->query('INSERT INTO '.$db_prefix.'posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES(\''.$db->escape($username).'\', 2, \'127.0.0.1\', \''.$db->escape($message).'\', '.$now.', 1)')
$db->query('INSERT INTO '.$db_prefix.'posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES(\''.$db->escape($username).'\', 2, \''.get_remote_address().'\', \''.$db->escape($message).'\', '.$now.', 1)')
or error('Unable to insert into table '.$db_prefix.'posts. Please check your configuration and try again', __FILE__, __LINE__, $db->error());

// Index the test post so searching for it works
Expand Down

0 comments on commit 96ab312

Please sign in to comment.