Skip to content
Browse files

Fixing creating the config.php during install.

  • Loading branch information...
1 parent 9e027a1 commit 42f340ae27358234b1200ac19d9136e3d0fae95d @reines reines committed Jul 31, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 install.php
View
8 install.php
@@ -87,9 +87,9 @@ function stripslashes_array($array)
//
function generate_config_file()
{
- global $db_type, $db_host, $db_name, $db_username, $db_password, $db_prefix, $cookie_name, $cookie_seed;
+ global $db_type, $db_host, $db_name, $db_username, $db_password1, $db_prefix, $cookie_name, $cookie_seed;
- return '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.addslashes($db_name)."';\n".'$db_username = \''.addslashes($db_username)."';\n".'$db_password = \''.addslashes($db_password)."';\n".'$db_prefix = \''.addslashes($db_prefix)."';\n".'$p_connect = false;'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n".'$cookie_seed = \''.random_key(16, false, true)."';\n\ndefine('PUN', 1);\n";
+ return '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.addslashes($db_name)."';\n".'$db_username = \''.addslashes($db_username)."';\n".'$db_password = \''.addslashes($db_password1)."';\n".'$db_prefix = \''.addslashes($db_prefix)."';\n".'$p_connect = false;'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n".'$cookie_seed = \''.random_key(16, false, true)."';\n\ndefine('PUN', 1);\n";
}
@@ -102,7 +102,7 @@ function generate_config_file()
$db_host = $_POST['db_host'];
$db_name = $_POST['db_name'];
$db_username = $_POST['db_username'];
- $db_password = $_POST['db_password'];
+ $db_password1 = $_POST['db_password1'];
$db_prefix = $_POST['db_prefix'];
$cookie_name = $_POST['cookie_name'];
$cookie_seed = $_POST['cookie_seed'];
@@ -1701,7 +1701,7 @@ function process_form(the_form)
<input type="hidden" name="db_host" value="<?php echo $db_host; ?>" />
<input type="hidden" name="db_name" value="<?php echo pun_htmlspecialchars($db_name); ?>" />
<input type="hidden" name="db_username" value="<?php echo pun_htmlspecialchars($db_username); ?>" />
- <input type="hidden" name="db_password" value="<?php echo pun_htmlspecialchars($db_password1); ?>" />
+ <input type="hidden" name="db_password1" value="<?php echo pun_htmlspecialchars($db_password1); ?>" />
<input type="hidden" name="db_prefix" value="<?php echo pun_htmlspecialchars($db_prefix); ?>" />
<input type="hidden" name="cookie_name" value="<?php echo pun_htmlspecialchars($cookie_name); ?>" />
<input type="hidden" name="cookie_seed" value="<?php echo pun_htmlspecialchars($cookie_seed); ?>" />

0 comments on commit 42f340a

Please sign in to comment.
Something went wrong with that request. Please try again.