X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Finstall-inc.php;h=09f399cece65b73b5ecdc33b1b8110fdd38780a9;hb=05f2bbfff5c041bc126894e87ea979bd3df6eb25;hp=7e66a605bf42ab295a2332950afa6e7249dc9e60;hpb=c2e17d983fcbc0c3bd1dd37908d87c678f0367df;p=mailer.git diff --git a/inc/install-inc.php b/inc/install-inc.php index 7e66a605bf..09f399cece 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -1,7 +1,7 @@ '); - setRequestGetElement('page', 3); + addToInstallContent('
' . getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '
'); + setGetRequestElement('page', 3); } // END - if if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) { // Password is empty - addToInstallContent(getMessage('INSTALL_SMTP_PASS1_EMPTY') . '
'); - setRequestGetElement('page', 3); + addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS1_EMPTY') . '
'); + setGetRequestElement('page', 3); } // END - if if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) { // Password repeat is empty - addToInstallContent(getMessage('INSTALL_SMTP_PASS2_EMPTY') . '
'); - setRequestGetElement('page', 3); + addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS2_EMPTY') . '
'); + setGetRequestElement('page', 3); } // END - if if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) { // Passwords are not matching - addToInstallContent(getMessage('INSTALL_SMTP_PASS_MISMATCH') . '
'); - setRequestGetElement('page', 3); + addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS_MISMATCH') . '
'); + setGetRequestElement('page', 3); } // END - if } // END - if -// Is MXChange installed or no admin registered so far? +// Is the mailer installed or no admin registered so far? if ((!isInstalled()) || (!isAdminRegistered())) { // Output page for entered value switch (getRequestElement('page')) { @@ -88,23 +88,23 @@ if ((!isInstalled()) || (!isAdminRegistered())) { 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'; if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange'; if (empty($mysql['type'])) $mysql['type'] = 'MyISAM'; if (getTotalFatalErrors() > 0) { - addToInstallContent(''); + addToInstallContent('
'); foreach (getFatalArray() as $key => $err) { - addToInstallContent('· {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '
'); + addToInstallContent('
· {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '
'); } - addToInstallContent('
'); + addToInstallContent('
'); } $content['mysql_host'] = $mysql['host']; $content['mysql_dbase'] = $mysql['dbase']; @@ -121,7 +121,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { addTemplateToInstallContent('install_page2', $content); break; - case 3: + case '3': // Set more values $content['spath'] = postRequestElement('spath'); $content['burl'] = postRequestElement('burl'); @@ -162,7 +162,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { addTemplateToInstallContent('install_page3', $content); break; - case 5: // Misc settings + case '5': // Misc settings // General settings $content['spath'] = postRequestElement('spath'); $content['burl'] = postRequestElement('burl'); @@ -202,7 +202,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS')); } // END - if - if (getTotalFatalErrors() == 0) { + if (getTotalFatalErrors() == '0') { // Set type and prefix from POST data setConfigEntry('_TABLE_TYPE' , postRequestElement('mysql', 'type')); setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix')); @@ -217,9 +217,6 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Read the file $fileContent = readFromFile($FQFN, true); - // Compile all config entries (we use a filter here, yes...) - $fileContent = FILTER_COMPILE_CONFIG($fileContent); - // Split it up against ";\n" and merge it into existing SQLs mergeSqls(explode(";\n", $fileContent), 'install'); } else { @@ -230,7 +227,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { //* DEBUG: */ die('
'.print_r(getSqls(), true).'
'); // Are some SQLs found? - if (countSqls() == 0) { + if (countSqls() == '0') { // Abort here addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED')); return; @@ -248,12 +245,12 @@ if ((!isInstalled()) || (!isAdminRegistered())) { if (getTotalFatalErrors() > 0) { $OUT = ''; foreach (getFatalArray() as $value) { - $OUT .= "
  • " . $value . "
  • \n"; + $OUT .= '
  • ' . $value . '
  • '; } // END foreach $content['fatal_errors'] = $OUT; $OUT = ''; foreach ($mysql as $key => $value) { - $OUT .= " \n"; + $OUT .= ' '; } // END foreach $content['mysql_hidden'] = $OUT; $content['spath'] = postRequestElement('spath'); @@ -287,7 +284,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { default: logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestElement('page'))); - addTemplateToInstallContent('admin_settings_saved', "
    {--WRONG_PAGE--}
    "); + addTemplateToInstallContent('admin_settings_saved', '
    {--WRONG_PAGE--}
    '); break; } // END - switch } else {