-// Does something goes wrong?
-if (getTotalFatalErrors() == 0) {
- // Add main installation table
- LOAD_TEMPLATE('install_header');
+// Load header here
+loadIncludeOnce('inc/header.php');
+
+// Handle fatal errors
+runFilterChain('handle_fatal_errors');
+
+// Is plain or AJAX-enabled installation used?
+if (isGetRequestElementSet('installer')) {
+ // Set installer type
+ setSession('installer', getRequestElement('installer'));
+
+ // Redirect to install.php again
+ redirectToUrl('install.php');
+} elseif (isAjaxInstaller()) {
+ // AJAX-enabled installer:
+ // Load 'init' page
+ addTemplateToInstallContent('install_page_init');
+
+ // Prepare content
+ $content = array(
+ 'install_page' => getRequestElement('install_page')
+ );