X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=install.php;h=b1ad8f173626a96ce458bd4f54763af8368065a2;hb=0437f06b273f885db05736449a952c6eb72086ca;hp=788f7bfa026a2f11065b1b0d47b399c01b4e5198;hpb=7b0f17cd637e388049d2167811e4332cec1e979b;p=mailer.git diff --git a/install.php b/install.php index 788f7bfa02..b1ad8f1736 100644 --- a/install.php +++ b/install.php @@ -63,24 +63,24 @@ $GLOBALS['output_mode'] = 0; $GLOBALS['module'] = 'install'; // Load config file -require('inc/config.php'); - -// Header -loadInclude('inc/header.php'); - -// Reload page to page=welcome when it is not specified -if (!REQUEST_ISSET_GET('page')) { - redirectToUrl('install.php?page=welcome'); -} // END - if +require('inc/config-global.php'); // Already installed? -if ((isInstalled()) && (isAdminRegistered())) { +if (isInstalled()) { // Add fatal message addFatalMessage(__FILE__, __LINE__, getMessage('ALREADY_INSTALLED')); } // END - if // Does something goes wrong? if (getTotalFatalErrors() == 0) { + // Reload page to page=welcome when it is not specified + if (!REQUEST_ISSET_GET('page')) { + redirectToUrl('install.php?page=welcome'); + } // END - if + + // Load header here + loadIncludeOnce('inc/header.php'); + // Add main installation table LOAD_TEMPLATE('install_header'); @@ -89,10 +89,13 @@ if (getTotalFatalErrors() == 0) { // Close main installation table LOAD_TEMPLATE('install_footer'); -} -// Footer -loadInclude('inc/footer.php'); + // Footer + loadIncludeOnce('inc/footer.php'); +} else { + // Output fatal messages + loadInclude('inc/fatal_errors.php'); +} // ?>