X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=install.php;h=b1ad8f173626a96ce458bd4f54763af8368065a2;hp=d632be4e43ead547dd2e729d3660306079fab085;hb=0437f06b273f885db05736449a952c6eb72086ca;hpb=116f17077ae6fa32c7373ccd6aaf94044bb6c276 diff --git a/install.php b/install.php index d632be4e43..b1ad8f1736 100644 --- a/install.php +++ b/install.php @@ -65,22 +65,22 @@ $GLOBALS['module'] = 'install'; // Load config file require('inc/config-global.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 - // 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'); +} // ?>