} // END - if
// Notify all modules that we are installing
- $GLOBALS['__mailer_installing'] = true;
+ $GLOBALS['__mailer_installing'] = TRUE;
// Again we do a call-back, so generate a function name depending on 'do'
$callbackName = 'doAjaxInstaller' . capitalizeUnderscoreString(postRequestElement('do'));
case 'overview': // Enable only 'previous'
array_push($enabledNavigations, 'previous');
+ if (isInstallationDataCompleted()) {
+ // Add 'finish'
+ array_push($enabledNavigations, 'finish');
+ } // END - if
break;
default: // Unsupported value
$output = '';
// Check all data in session
- foreach (getSessionArray() as $key => $value) {
- // Skip 'mailer_theme', 'tab' and 'installer'
- if (in_array($key, array('mailer_theme', 'tab', 'installer'))) {
- // Skip this
- continue;
- } // END - if
+ foreach (array_keys($GLOBALS['installer_groups']) as $key) {
+ // Get values from session
+ $value = getSession($key);
// Is the data valid?
$verificationStatus['is_valid'] = (isInstallerDataValid($verificationStatus, $key, $value));
} // END - foreach
// Is it still true?
- if ($isAllValid === TRUE) {
+ if ((isInstallationDataCompleted()) && ($isAllValid === TRUE)) {
// Set 'done' and message
$verificationStatus['status'] = 'done';
$verificationStatus['message'] = '{--INSTALLER_OVERVIEW_FINAL_CHECK_DONE--}';
// Is it still valid?
if ($verificationStatus['status'] != 'done') {
// Log message away
- logDebugMessage(__FUNCTION__, __LINE__, 'Final check on all stored data failed. message=' . $verificationStatus['message']);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Final check on all stored data failed. message=' . $verificationStatus['message']);
+
+ // Process failed fields
+ $verificationStatus['failed_fields'] = handleInstallerFailedFields($verificationStatus['failed_fields']);
// Output the array for JSON reply
- setAjaxReplyContent(json_encode($verificationStatus, JSON_FORCE_OBJECT));
+ setAjaxReplyContent(loadTemplate('install_overview_failed', TRUE, $verificationStatus));
/*
* Something went wrong, this might happen when e.g. the user has tried
* to save invalid database login data but hit reload button on error
* message.
*/
- setHttpStatus('500 Internal Server Error');
+ setHttpStatus('200 OK');
// Abort here
return;
} // END - if
-
- // Output final rendered content
- setAjaxReplyContent($output);
-
- // All okay if we reach this point
- setHttpStatus('200 OK');
}
// [EOF]