// Init variables
$mysql = array();
-if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) $mysql = postRequestElement('mysql');
+if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) {
+ // Transfer 'mysql' array
+ $mysql = postRequestElement('mysql');
+} // END - if
// Check if both passwords from SMTP are matching
if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) {
addTemplateToInstallContent('install_welcome');
break;
- case '1': // Server path, base URL
+ case 1: // Server path, base URL
// Load template
addTemplateToInstallContent('install_page1');
break;
- case '2': // MySQL data (alone!)
+ case 2: // MySQL data (alone!)
if (empty($mysql['dbase'])) $mysql['dbase'] = 'your_database';
if (empty($mysql['login'])) $mysql['login'] = 'your_login';
if (empty($mysql['host'])) $mysql['host'] = 'localhost';
$content['email'] = postRequestElement('email');
// Load template
- addTemplateToInstallContent('install_page2', false, $content);
+ addTemplateToInstallContent('install_page2', $content);
break;
- case '3':
+ case 3:
// Set more values
$content['spath'] = postRequestElement('spath');
$content['burl'] = postRequestElement('burl');
$content['smtp_pass2'] = $smtpPass2;
// Load template
- addTemplateToInstallContent('install_page3', false, $content);
+ addTemplateToInstallContent('install_page3', $content);
break;
- case '5': // Misc settings
+ case 5: // Misc settings
// General settings
$content['spath'] = postRequestElement('spath');
$content['burl'] = postRequestElement('burl');
$content['slogan'] = postRequestElement('slogan');
$content['email'] = postRequestElement('email');
- // MySQL settings
- $content['mysql_host'] = $mysql['host'];
- $content['mysql_dbase'] = $mysql['dbase'];
- $content['mysql_prefix'] = $mysql['prefix'];
- $content['mysql_login'] = $mysql['login'];
- $content['table_type'] = $mysql['type'];
-
// SMTP settings
$content['smtp_host'] = postRequestElement('smtp_host');
$content['smtp_user'] = postRequestElement('smtp_user');
$OUT = '';
foreach ($mysql as $key => $value) {
$OUT .= " <input type=\"hidden\" name=\"mysql[" . $key . "]\" value=\"" . $value . "\" />\n";
- }
+ } // END - foreach
$content['mysql_hidden'] = $OUT;
// Load template
- addTemplateToInstallContent('install_page5', false, $content);
+ addTemplateToInstallContent('install_page5', $content);
break;
case 'finalize': // Write captured data to files
$content['smtp_pass'] = postRequestElement('smtp_pass1');
// Load template
- addTemplateToInstallContent('install_fatal_errors', false, $content);
+ addTemplateToInstallContent('install_fatal_errors', $content);
} else {
// Installation is done!
redirectToUrl('install.php?page=finished');