templates/de/html/install/install_main_ajax.tpl svneol=native#text/plain
templates/de/html/install/install_main_plain.tpl svneol=native#text/plain
templates/de/html/install/install_menu.tpl svneol=native#text/plain
+templates/de/html/install/install_overview_failed.tpl svneol=native#text/plain
templates/de/html/install/install_page1.tpl svneol=native#text/plain
templates/de/html/install/install_page2.tpl svneol=native#text/plain
templates/de/html/install/install_page3.tpl svneol=native#text/plain
templates/de/html/install/install_page_database_config.tpl svneol=native#text/plain
templates/de/html/install/install_page_init.tpl svneol=native#text/plain
templates/de/html/install/install_page_other_config.tpl svneol=native#text/plain
+templates/de/html/install/install_page_overview.tpl svneol=native#text/plain
templates/de/html/install/install_page_smtp_config.tpl svneol=native#text/plain
templates/de/html/install/install_page_welcome.tpl svneol=native#text/plain
templates/de/html/install/install_selector.tpl svneol=native#text/plain
-jQuery UI Authors (http://jqueryui.com/about)
+jQuery UI Authors (http://jqueryui.com/about)
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
./inc/language/de.php:735:// @TODO Are these constants longer used?
./inc/language-functions.php:255: // @TODO These are all valid languages, again hard-coded
./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
-./inc/language/install_de.php:137: // @TODO Move this to e.g. ext-smtp
+./inc/language/install_de.php:140: // @TODO Move this to e.g. ext-smtp
./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no *
./inc/language/order_de.php:70: // @TODO Find better text
./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings *
(Vorsicht! Kein .dist mehr!).
Stellen Sie dann in der inc/cache/config-local.php den Eintrag
-MXCHANGE_INSTALLED um auf 'Y': (zirka Zeile 68)
+MAILER_INSTALLED um auf 'Y': (zirka Zeile 68)
Vorher:
-setConfigEntry('MXCHANGE_INSTALLED', 'N');
+setConfigEntry('MAILER_INSTALLED', 'N');
Nachher:
-setConfigEntry('MXCHANGE_INSTALLED', 'Y');
+setConfigEntry('MAILER_INSTALLED', 'Y');
Anschliessend stellen Sie die MySQL-Zugangsdaten, den Titel Ihres Mailtausches,
Werbspruch (Slogan) und Ihre EMail-Adresse (zum Empfangen von Anmelde-EMails
Schauen Sie unter "10. Weiterfuehrende, wichtige Links" nach, wenn Sie nicht
weiter wissen.
+********************************************************************************
+* Bis hier die veraltete Anleitung zur manuellen Installation *
+********************************************************************************
+
----------------------------
3. b) Zugriffsrechte (CHMOD)
----------------------------
Es sind fuer Mailer-Project nur Leserechte auf Dateien und Verzeichnisse, sowie
Ausfuehrbar/Durchsuchbar fuer Verzeichnisse noetig. Schreibrechte brauchen Sie
-auf das Verzeichnis inc/.secret/, inc/cache/ und inc/cache/_compiled/html/, da
-dort Dateien angelegt werden muessen. Nach der fertigen Installation koennen Sie
-sogar Schreibrechte vom Verzeichnis inc/.secret/ entfernen. Sie sollten dies
-aber erst nach der Installation von ext-sql_patches tun, da die Erweiterung
-dort Schreibzugriff braucht.
+auf das Verzeichnis inc/cache/ und inc/cache/_compiled/html/, da dort Dateien
+angelegt werden muessen.
Einfacher dargestellt bedeutet dies: (Oktalwerte)
-- CHMOD 0555 auf alle Verzeichnisse, plus CHMOD 0777 auf inc/.secret/,
- inc/cache/ und inc/cache/_compiled/html/
+- CHMOD 0555 auf alle Verzeichnisse, plus CHMOD 0777 auf inc/cache/ und
+ inc/cache/_compiled/(email|html|xml)/ (alle drei)
- CHMOD 0444 auf alle Dateien, bis auf die Dateien in den oben besagten
Verzeichnissen.
Ihr Hoster leitet alle nicht eingerichteten Subdomains auf Ihre Hauptseite
weiter. Er hat eine Wildcat-Domain eingrichtet, die alle nicht eingerichteten
Subdomains auffaengt.
-OESUNG:
+LOESUNG:
Editieren Sie die Datei inc/cache/config-local.php und tragen Sie dort
die URL Ihrer Webseite ein:
// Process the request
processAjaxRequest();
- // Is there an error? ('200 OK' is fine)
- if ((getHttpStatus() != '200 OK') && (getHttpStatus() != '404 NOT FOUND')) {
+ // Is there an error which is not fine?
+ if (!isAjaxHttpStatusAccepted()) {
// The process was handled but didn't work
reportBug(__FUNCTION__, __LINE__, 'AJAX request is valid but does not do anything.');
} // END - if
// Setter for AJAX reply content
function setAjaxReplyContent ($content) {
+ // Log message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . strlen($content));
+
// Set it, but with URL encoding
$GLOBALS['ajax_reply']['reply_content'] = urlencode(doFinalCompilation($content, FALSE));
}
// Send AJAX content
function sendAjaxContent () {
// Is the status fine or template not found (404)?
- if ((getHttpStatus() == '200 OK') || (getHttpStatus() == '404 NOT FOUND')) {
+ if (isAjaxHttpStatusAccepted()) {
// Then output the JSON
outputHtml(json_encode($GLOBALS['ajax_reply'], JSON_FORCE_OBJECT));
} // END - if
}
+// Checks whether the HTTP status is accepted
+function isAjaxHttpStatusAccepted () {
+ // Is it accepted?
+ $isAccepted = in_array(strtoupper(getHttpStatus()), array('200 OK', '404 NOT FOUND'));
+
+ // Return it
+ return $isAccepted;
+}
+
// [EOF]
?>
} // 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]
// Watch out for these lines and execute them as single command
// @TODO Make this all better... :-/
$watchLines = array(
- 'SITE_KEY' => 'SITE_KEY',
- 'DEFAULT_LANG' => 'DEFAULT_LANG',
- 'warn_no_pass' => 'WARN_NO_PASS',
- 'WRITE_FOOTER' => 'WRITE_FOOTER',
- 'OUTPUT_MODE' => 'OUTPUT_MODE',
- 'MAIN_TITLE' => 'MAIN_TITLE',
- 'SLOGAN' => 'SLOGAN',
- 'WEBMASTER' => 'WEBMASTER',
- 'mxchange_installed' => 'MXCHANGE_INSTALLED',
- 'admin_registered' => 'ADMIN_REGISTERED',
- '_MYSQL_PREFIX' => '_MYSQL_PREFIX',
- '_TABLE_TYPE' => '_TABLE_TYPE',
- '_DB_TYPE' => '_DB_TYPE',
- 'SMTP_HOSTNAME' => 'SMTP_HOSTNAME',
- 'SMTP_USER' => 'SMTP_USER',
- 'SMTP_PASSWORD' => 'SMTP_PASSWORD',
- 'ENABLE_BACKLINK' => 'ENABLE_BACKLINK',
- 'MAIN_TITLE' => 'MAIN_TITLE',
- 'SLOGAN' => 'SLOGAN',
- 'WEBMASTER' => 'WEBMASTER',
- 'PATH' => 'PATH',
- 'URL' => 'URL',
+ 'SITE_KEY' => 'SITE_KEY',
+ 'DEFAULT_LANG' => 'DEFAULT_LANG',
+ 'warn_no_pass' => 'WARN_NO_PASS',
+ 'WRITE_FOOTER' => 'WRITE_FOOTER',
+ 'OUTPUT_MODE' => 'OUTPUT_MODE',
+ 'MAIN_TITLE' => 'MAIN_TITLE',
+ 'SLOGAN' => 'SLOGAN',
+ 'WEBMASTER' => 'WEBMASTER',
+ 'mailer_installed' => 'MAILER_INSTALLED',
+ 'admin_registered' => 'ADMIN_REGISTERED',
+ '_MYSQL_PREFIX' => '_MYSQL_PREFIX',
+ '_TABLE_TYPE' => '_TABLE_TYPE',
+ '_DB_TYPE' => '_DB_TYPE',
+ 'SMTP_HOSTNAME' => 'SMTP_HOSTNAME',
+ 'SMTP_USER' => 'SMTP_USER',
+ 'SMTP_PASSWORD' => 'SMTP_PASSWORD',
+ 'ENABLE_BACKLINK' => 'ENABLE_BACKLINK',
+ 'MAIN_TITLE' => 'MAIN_TITLE',
+ 'SLOGAN' => 'SLOGAN',
+ 'WEBMASTER' => 'WEBMASTER',
+ 'PATH' => 'PATH',
+ 'URL' => 'URL',
);
// Make these lower-case! (damn stupid code...)
- $lowerCase = array('WARN_NO_PASS', 'MXCHANGE_INSTALLED', 'ADMIN_REGISTERED');
+ $lowerCase = array('WARN_NO_PASS', 'MAILER_INSTALLED', 'ADMIN_REGISTERED');
// Special comments...
$comments = array(
'WARN_NO_PASS' => 'NULLPASS-WARNING',
- 'MXCHANGE_INSTALLED' => 'INSTALLED',
+ 'MAILER_INSTALLED ' => 'INSTALLED',
'ADMIN_REGISTERED' => 'ADMIN-SETUP',
'_MYSQL_PREFIX' => 'MYSQL-PREFIX',
'_TABLE_TYPE' => 'TABLE-TYPE',
setConfigEntry('OUTPUT_MODE', 'render');
// CFG: INSTALLED
-setConfigEntry('MXCHANGE_INSTALLED', 'N');
+setConfigEntry('MAILER_INSTALLED', 'N');
// CFG: ADMIN-SETUP
setConfigEntry('ADMIN_REGISTERED', 'N');
'mysql_host' => 'database_config',
'mysql_dbase' => 'database_config',
'mysql_prefix' => 'database_config',
- 'mysql_engine' => 'database_config',
+ 'mysql_engine' => 'database_config',
'mysql_login' => 'database_config',
'mysql_password1' => 'database_config',
'mysql_password2' => 'database_config',
}
// Write the local config-local.php file from "template"
-function doInstallWriteLocalConfigurationFile ($path) {
+function doInstallWriteLocalConfigurationFile ($path, $url, $title, $slogan, $email, $noPassword, $writeFooter, $backLink, $databaseHost, $databaseName, $databaseLogin, $databasePassword, $databasePrefix, $databaseType, $smtpHost, $smtpUser, $smtpPassword) {
// Copy the config template and verify it
- copyFileVerified(postRequestElement('spath') . 'inc/config-local.php.dist', postRequestElement('spath') . getCachePath() . 'config-local.php', 0644);
-
- // Ok, all done. So we can write the config data to the php files
- // Do only write these if they differ from auto-detected values
- if (postRequestElement('spath') != getPath()) changeDataInLocalConfigurationFile('SERVER-PATH', "setConfigEntry('PATH', '", "');", postRequestElement('spath'), 0);
- if (postRequestElement('burl') != getUrl()) changeDataInLocalConfigurationFile('HOST-URL', "setConfigEntry('URL', '", "');", postRequestElement('burl'), 0);
+ copyFileVerified($path . 'inc/config-local.php.dist', $path . getCachePath() . 'config-local.php', 0644);
+
+ /*
+ * Ok, all done. So we can write the config data to the php files. Do only
+ * write these if they differ from auto-detected values.
+ */
+ if ($path != getPath()) {
+ changeDataInLocalConfigurationFile('SERVER-PATH', "setConfigEntry('PATH', '", "');", $path, 0);
+ } // END - if
+ if ($url != getUrl()) {
+ changeDataInLocalConfigurationFile('HOST-URL', "setConfigEntry('URL', '", "');", $url, 0);
+ } // END - if
// Write more data
- changeDataInLocalConfigurationFile('MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", postRequestElement('title'), 0);
- changeDataInLocalConfigurationFile('SLOGAN', "setConfigEntry('SLOGAN', '", "');", postRequestElement('slogan'), 0);
- changeDataInLocalConfigurationFile('WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", postRequestElement('email'), 0);
- changeDataInLocalConfigurationFile('NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", postRequestElement('warn_no_pass'), 0);
- changeDataInLocalConfigurationFile('WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", postRequestElement('wfooter'), 0);
- changeDataInLocalConfigurationFile('BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", postRequestElement('blink'), 0);
+ changeDataInLocalConfigurationFile('MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", $title, 0);
+ changeDataInLocalConfigurationFile('SLOGAN', "setConfigEntry('SLOGAN', '", "');", $slogan, 0);
+ changeDataInLocalConfigurationFile('WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", $email, 0);
+ changeDataInLocalConfigurationFile('NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", $noPassword, 0);
+ changeDataInLocalConfigurationFile('WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", $writeFooter, 0);
+ changeDataInLocalConfigurationFile('BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", $backLink, 0);
// @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
- changeDataInLocalConfigurationFile('MYSQL-HOST', " 'host' => '", "',", postRequestElement('mysql','host'), 0);
- changeDataInLocalConfigurationFile('MYSQL-DBASE', " 'dbase' => '", "',", postRequestElement('mysql','dbase'), 0);
- changeDataInLocalConfigurationFile('MYSQL-LOGIN', " 'login' => '", "',", postRequestElement('mysql','login'), 0);
- changeDataInLocalConfigurationFile('MYSQL-PASSWORD', " 'password' => '", "',", postRequestElement('mysql','pass1'), 0);
- changeDataInLocalConfigurationFile('MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestElement('mysql','prefix'), 0);
- changeDataInLocalConfigurationFile('TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestElement('mysql','type'), 0);
- changeDataInLocalConfigurationFile('SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestElement('smtp_host'), 0);
- changeDataInLocalConfigurationFile('SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestElement('smtp_user'), 0);
- changeDataInLocalConfigurationFile('SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestElement('smtp_pass1'), 0);
+ changeDataInLocalConfigurationFile('MYSQL-HOST', " 'host' => '", "',", $databaseHost, 0);
+ changeDataInLocalConfigurationFile('MYSQL-DBASE', " 'dbase' => '", "',", $databaseName, 0);
+ changeDataInLocalConfigurationFile('MYSQL-LOGIN', " 'login' => '", "',", $databaseLogin, 0);
+ changeDataInLocalConfigurationFile('MYSQL-PASSWORD', " 'password' => '", "',", $databasePassword, 0);
+ changeDataInLocalConfigurationFile('MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", $databasePrefix, 0);
+ changeDataInLocalConfigurationFile('TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", $databaseType, 0);
+ changeDataInLocalConfigurationFile('SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", $smtpHost, 0);
+ changeDataInLocalConfigurationFile('SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", $smtpUser, 0);
+ changeDataInLocalConfigurationFile('SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", $smtpPassword, 0);
// Generate a long site-key and write it
changeDataInLocalConfigurationFile('SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", generatePassword(50), 0);
// Script is now installed
- changeDataInLocalConfigurationFile('INSTALLED', "setConfigEntry('MXCHANGE_INSTALLED', '", "');", 'Y', 0);
+ changeDataInLocalConfigurationFile('INSTALLED', "setConfigEntry('MAILER_INSTALLED', '", "');", 'Y', 0);
}
// Adds a given template with content to install output stream
return $isPlainInstaller;
}
+// Handle all given failed fields
+function handleInstallerFailedFields ($failedFields) {
+ // Don't do anything with no array or no entries
+ if ((!is_array($failedFields)) || (count($failedFields) == 0)) {
+ // Abort here
+ reportBug(__FUNCTION__, __LINE__, 'failedFields[]=' . gettype($failedFields) . ' verification failed');
+ } // END - if
+
+ // Handle all
+ $out = '<ol>';
+ foreach ($failedFields as $key => $field) {
+ // "Translate" it
+ $out .= '<li>{--INSTALLER_FIELD_FAILED_' . strtoupper($field) . '--}</li>';
+ } // END - foreach
+ $out .= '</ol>';
+
+ // Return it
+ return $out;
+}
+
// Checks given key/value pair if it is valid by a call-back
function isInstallerDataValid (&$saveStatus, $key, $value) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ' - ENTERED!');
} // END - if
// Then call it back
- $isValid = (bool) call_user_func($callbackName, $value);
+ $isValid = (bool) call_user_func($callbackName, trim($value));
// Is it not valid?
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',isValid=' . intval($isValid));
$isValid = (
// Is it a directory?
(isDirectory($value))
+ &&
+ // Doesn't contain dots
+ (strpos($value, '..') === FALSE)
&&
// Is there a trailing slash?
(substr($value, -1, 1) == '/')
&&
// What about gen_sql_patches.php?
(isFileReadable($value . 'inc/gen_sql_patches.php'))
+ &&
+ // And how about referral-functions.php?
+ (isFileReadable($value . 'inc/referral-functions.php'))
);
// Return it
return $isValid;
}
+// Call-back function to checl validity of 'main_title'
+function isInstallerMainTitleValid ($value) {
+ // Is it valid?
+ // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work
+ $isValid = ((strlen($value) >= 4) && ($value != getMessage('DEFAULT_MAIN_TITLE')));
+
+ // Return it
+ return $isValid;
+}
+
+// Call-back function to checl validity of 'slogan'
+function isInstallerSloganValid ($value) {
+ // Is it valid?
+ $isValid = ((strlen($value) >= 4) && ($value != getMessage('DEFAULT_SLOGAN')));
+
+ // Return it
+ return $isValid;
+}
+
// Call-back function to check validity of 'webmaster'
function isInstallerWebmasterValid ($value) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' - ENTERED!');
// Is it a valid email address?
- $isValid = (
+ $isValid = ((
// Is it a valid email address?
(isEmailValid($value))
||
// Or is there 'localhost/127.0.0.1' as hostname? Then don't check email address (e.g. you@localhost)
(in_array(detectServerName(), array('localhost', '127.0.0.1')))
- );
+ ) && (
+ // Is not default "email address"
+ $value != getMessage('DEFAULT_WEBMASTER')
+ ));
// Return it
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ',isValid=' . intval($isValid) . ' - EXIT');
function isInstallerMysqlHostValid ($value) {
// This value must match a hostname or IP address
$isValid = (
+ // Shall not be empty
+ (!empty($value)) && (
// Is localhost/127.0.0.1? (mostly the case)
(in_array($value, array('localhost', '127.0.0.1')))
||
||
// Host name match
(preg_match('/([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}/', $value))
- );
+ ));
// Return it
return $isValid;
}
// Call-back function to check validity of 'mysql_engine'
-function isInstallerMysqlTypeValid ($value) {
+function isInstallerMysqlEngineValid ($value) {
// This value must be 'MyISAM' or 'InnoDB'
$isValid = in_array($value, array('MyISAM', 'InnoDB'));
return $isValid;
}
+// Call-back function to check validity of 'mysql_dbase'
+function isInstallerMysqlDbaseValid ($value) {
+ // This value must not be empty
+ $isValid = ((!empty($value)) && ($value != 'your_database'));
+
+ // Return it
+ return $isValid;
+}
+
+// Call-back function to check validity of 'mysql_login'
+function isInstallerMysqlLoginValid ($value) {
+ // This value must not be empty
+ $isValid = ((!empty($value)) && ($value != 'your_login'));
+
+ // Return it
+ return $isValid;
+}
+
+// Call-back function to check validity of 'mysql_prefix'
+function isInstallerMysqlPrefixValid ($value) {
+ // This value must not be empty
+ $isValid = !empty($value);
+
+ // Return it
+ return $isValid;
+}
+
// ----------------- SMTP configuration -----------------
// ----------------- Other configuration -----------------
// Call-back functions to post-check validity
//-----------------------------------------------------------------------------
+// Call-back function to check if base data is valid
+function isInstallerPostBaseDataValid ($currentTab) {
+ // By default it is not valid
+ $isValid = FALSE;
+
+ // Is the base path valid?
+ if (!isInstallerBasePathValid(postRequestElement('base_path'))) {
+ // Then mark it
+ $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_BASE_PATH_INVALID--}';
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'base_path');
+ return FALSE;
+ } elseif (!isInstallerBaseUrlValid(postRequestElement('base_url'))) {
+ // Then mark it
+ $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_BASE_URL_INVALID--}';
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'base_url');
+ return FALSE;
+ } elseif (strlen(postRequestElement('main_title')) < 3) {
+ // To short
+ $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_MAIN_TITLE_INVALID--}';
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'main_title');
+ return FALSE;
+ } elseif (strlen(postRequestElement('slogan')) < 3) {
+ // To short
+ $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_SLOGAN_INVALID--}';
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'slogan');
+ return FALSE;
+ } elseif (!isInstallerWebmasterValid(postRequestElement('webmaster'))) {
+ // Then mark it
+ $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_WEBMASTER_INVALID--}';
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'webmaster');
+ return FALSE;
+ } else {
+ // All fine
+ $isValid = TRUE;
+
+ // Remember this tab in session
+ installTabOkay($currentTab);
+ }
+
+ // Return it
+ return $isValid;
+}
+
// Call-back function to check if database configuration in POST is valid
function isInstallerPostDatabaseConfigValid ($currentTab) {
// By default nothing is valid
// Still something bad happened (e.g. tables found)
$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_IN_USE--}';
array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_dbase');
- } // END - if
+ } else {
+ // Remember this tab in session
+ installTabOkay($currentTab);
+ }
// Return status
return $isValid;
}
+// Store given tab in session
+function installTabOkay ($currentTab) {
+ // Is it set?
+ if (isSessionVariableSet('installer_okay')) {
+ // Is this tab already found?
+ if (strpos(getSession('installer_okay'), $currentTab) === FALSE) {
+ // Then extend it
+ setSession('installer_okay', getSession('installer_okay') . ';' . $currentTab);
+ } // END - if
+ } else {
+ // Initially set it
+ setSession('installer_okay', $currentTab);
+ }
+}
+
+// Checks whether at least the required tabs are completed
+function isInstallationDataCompleted () {
+ // Check both
+ $isCompleted = (
+ (isSessionVariableSet('installer_okay')) &&
+ (strpos(getSession('installer_okay'), 'base_data') !== FALSE) &&
+ (strpos(getSession('installer_okay'), 'database_config') !== FALSE)
+ );
+
+ // Return it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isCompleted=' . intval($isCompleted) . ',installer_okay=' . getSession('installer_okay'));
+ return $isCompleted;
+}
+
// Call-back function to check if enable_backlink is Y/N
function isInstallerEnableBacklinkValid ($currentTab) {
// Check and return it
return in_array($currentTab, array('render', 'direct'));
}
+// Wrapper to import given installation SQL dump
+function importInstallSqlDump ($dumpName) {
+ // Import the file
+ importSqlDump('install', $dumpName);
+}
+
// [EOF]
?>
setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix'));
setConfigEntry('__DB_NAME' , $GLOBALS['install_mysql']['dbase']);
- // Both exists so import them
- foreach (array('tables', 'menu-'.getLanguage()) as $dump) {
- // Should be save here because file_exists() is there but we check it again. :)
- $FQFN = postRequestElement('spath') . 'install/' . $dump . '.sql';
-
- // Is the file readable?
- if (isFileReadable($FQFN)) {
- // Read the file
- $fileContent = readSqlDump($FQFN);
+ // Set path
+ setConfigEntry('PATH', postRequestElement('spath'));
+ unset($GLOBALS['getPath']);
- // Split it up against ";\n" and merge it into existing SQLs
- mergeSqls(explode(";\n", $fileContent), 'install');
- } else {
- // Not readable!
- reportBug(__FILE__, __LINE__, sprintf("SQL dump %s is not readable.", $dump));
- }
- } // END - foreach
+ // Both exists so import them
+ importInstallSqlDump('tables');
+ importInstallSqlDump('menu-' . getLanguage());
//* DEBUG: */ die(__FUNCTION__.'['.__LINE__.']:'<pre>'.print_r(getSqls(), TRUE).'</pre>');
// Are some SQLs found?
// Now run all queries through
runFilterChain('run_sqls');
-
- // Copy the config template and verify it
- doInstallWriteLocalConfigurationFile(postRequestElement('spath'));
} // END - if
} // END - if
} // END - if
$content['spath'] = postRequestElement('spath');
$content['burl'] = postRequestElement('burl');
$content['title'] = postRequestElement('title');
+ $content['slogan'] = postRequestElement('slogan');
+ $content['email'] = postRequestElement('email');
$content['smtp_host'] = postRequestElement('smtp_host');
$content['smtp_user'] = postRequestElement('smtp_user');
$content['smtp_pass'] = postRequestElement('smtp_pass1');
// We have handled all fatal errors here
initFatalMessages();
} else {
+ // Copy the config template and verify it
+ doInstallWriteLocalConfigurationFile(
+ postRequestElement('spath'),
+ postRequestElement('burl'),
+ postRequestElement('title'),
+ postRequestElement('slogan'),
+ postRequestElement('email'),
+ postRequestElement('warn_no_pass'),
+ postRequestElement('wfooter'),
+ postRequestElement('blink'),
+ postRequestElement('mysql', 'host'),
+ postRequestElement('mysql', 'dbase'),
+ postRequestElement('mysql', 'login'),
+ postRequestElement('mysql', 'pass1'),
+ postRequestElement('mysql', 'prefix'),
+ postRequestElement('mysql', 'type'),
+ postRequestElement('smtp_host'),
+ postRequestElement('smtp_user'),
+ postRequestElement('smtp_pass1')
+ );
+
// Register ext-sql_patches and ext-task
if ((registerExtension('sql_patches', NULL)) && (registerExtension('task', NULL))) {
// Installation is done!
'MEMBER_CASH_COUPON' => "Gutschein einlösen",
'MEMBER_ENTER_COUPON_CODE' => "Gutschein-Code eingeben:",
'MEMBER_COUPON_CODE_EMPTY' => "Sie haben keinen Gutschein-Code eingegeben. Bitte versuchen Sie es erneut.",
- 'MEMBER_COUPON_CODE_ALREADY_CASHED' => "Der von Ihnen eingegebene Gutschein-Code ist entweder ungütig, Ihnen nicht zugewiesen, bereits abgelaufen, oder Sie haben ihn bereits eingelöst.",
+ 'MEMBER_COUPON_CODE_ALREADY_CASHED' => "Der von Ihnen eingegebene Gutschein-Code ist entweder ungültig, Ihnen nicht zugewiesen, bereits abgelaufen, oder Sie haben ihn bereits eingelöst.",
'MEMBER_COUPON_CODE_CASHED' => "Ihr Gutschein im Wert von <span class=\"data\">{%%pipe,translateComma=%s%%} {?POINTS?}</span> wurde soeben eingelöst und Ihrem Konto gutgeschrieben.",
'MEMBER_COUPON_CASHED_404' => "Sie haben noch keinen Gutschein eingelöst oder es wurde noch keiner erstellt. Bitte prüfen Sie Ihre Emails, ob Sie eventuell einen erhalten haben, den Sie noch einlösen können.",
'MEMBER_LIST_CASHED_COUPONS_TITLE' => "Alle Ihre eingelösten Gutscheine",
'MEMBER_ORDER_TEST_STARTED' => "Framekiller-Test startet...",
'MEMBER_ORDER_PLEASE_WAIT_1' => "Ihre Seite wird auf Framekiller getestet. Bitte noch ",
'MEMBER_ORDER_PLEASE_WAIT_2' => " Sekunden warten.",
- 'ADMIN_SESSION_SAVE_PATH_INVALID' => "Pfad für Sitzungsdateien ungütig.",
+ 'ADMIN_SESSION_SAVE_PATH_INVALID' => "Pfad für Sitzungsdateien ungültig.",
'ADMIN_CONFIG_SESSION_SAVE_PATH' => "Speicherpfad f. Sitzungsdateien",
'ADMIN_BASE_PATH' => "Absoluter Server-Pfad",
'ADMIN_SESSION_SAVE_PATH_NOTICE' => "Sie sollten für Sitzungsdateien einen Pfad wählen der ausserhalb des Server-Pfades liegt, da sonst eventuell die Sitzungsdateien vom Web erreichbar sind, was ein hohes Sicherheitsrisiko darstellt.",
'INSTALLER_FINISHED' => "Die Installation ist abgeschlossen.",
'INSTALLER_FIN_SECU' => "Sie sollten jetzt die Dateien <u>install.php</u> und <u>inc/install-inc.php</u> von Ihrem Server löschen. Dies ist zwar normalerweise nicht erforderlich, Sie sollten es aber dennoch tun, um die Sicherheit zusätzlich zu erhöhen.",
'INSTALLER_CONTINUE_ADMIN' => "Weiter zum Administrationsbereich...",
+ 'INSTALLER_INIT_PLEASE_WAIT' => "Einen Augenblick, die Installation wird vorbereitet ...",
// Plain installer - general
'INSTALLER_SQL_IMPORT_FAILED' => "Konnte die SQL-Dateien aus <strong>install/</strong> nicht nachladen. Bitte Zugriffsrechte (CHMOD) auf die Dateien überprüfen. Diese sollten 644 mindestens aufweisen.",
// Installation pages titles
'INSTALLER_PAGE_INIT_TITLE' => "Installationsroute initialisiert gerade",
- 'INSTALLER_PAGE_WELCOME_TITLE' => "Willkommen zur Installation von {?TITLE?}, dem freien {?mt_word?}-Script.",
- 'INSTALLER_BASE_DATA_TITLE' => "Server-Pfad, Basis-URL und Webseitentitel",
- 'INSTALLER_DATABASE_CONFIG_TITLE' => "Datenbankzugangsdaten: Hostname, Login, Passwort, Tabellentyp usw.",
- 'INSTALLER_SMTP_CONFIG_TITLE' => "SMTP-Server Einstellungen",
- 'INSTALLER_OTHER_CONFIG_TITLE' => "Verschiedene Einstellungen",
+ 'INSTALLER_PAGE_WELCOME_TITLE' => "Willkommen zur Installation von {?TITLE?}, dem freien {?mt_word?}-Script",
+ 'INSTALLER_PAGE_BASE_DATA_TITLE' => "Server-Pfad, Basis-URL und Webseitentitel",
+ 'INSTALLER_PAGE_DATABASE_CONFIG_TITLE' => "Zugangsdaten zur Datenbank",
+ 'INSTALLER_PAGE_SMTP_CONFIG_TITLE' => "SMTP-Server Einstellungen",
+ 'INSTALLER_PAGE_OTHER_CONFIG_TITLE' => "Verschiedene Einstellungen",
+ 'INSTALLER_PAGE_OVERVIEW_TITLE' => "Die Installation kann beginnen",
// Installation pages descriptions
'INSTALLER_BASE_DATA_DESCRIPTION' => "Geben Sie hier den absoluten Server-Pfad (/ihr/server/pfad/) <strong>mit</strong> abschliessendem Slash (/), die Basis-URL (vorgegebene Werte stimmen meistens) und den Titel Ihres {?mt_word2?} ein.",
'INSTALLER_DATABASE_CONFIG_DESCRIPTION' => "Geben Sie hier die Daten vom Datenbankserver ein, die Ihnen vom Hoster mitgeteilt wurden. Es wird dann anschliessend versucht, eine Testverbindung aufzubauen.",
- 'INSTALLER_SMTP_CONFIG_DESCRIPTION' => "Geben Sie hier die Ihre Zugangsdaten zum SMTP-Server (ausgehender Mailserver) ein, wenn der mail()-Befehl auf Ihrem Server deaktiviert sein sollte. Oder lassen Sie alle Felder leer für Standard-Einstellungen.",
+ 'INSTALLER_SMTP_CONFIG_DESCRIPTION' => "Geben Sie hier Ihre Zugangsdaten zum SMTP-Server (ausgehender Mailserver) ein, wenn der mail()-Befehl auf Ihrem Server deaktiviert sein sollte. Oder lassen Sie alle Felder leer für Standard-Einstellungen.",
'INSTALLER_OTHER_CONFIG_DESCRIPTION' => "Hier können Sie weitere Einstellungen vornehmen, wie zum Beispiel den Ausgabe-Modus festlegen, in der der HTML-Code ausgegeben werden soll, usw.",
// Installation page - Base data
'INSTALLER_MODE_RENDER' => "In $GLOBALS "rendern"",
'INSTALLER_MODE_DIRECT' => "Im Ausgabebuffer cachen",
'INSTALLER_ENABLE_BACKLINK' => "Backlink zu {?SERVER_URL?} setzen?",
- 'INSTALLER_ENABLE_BACKLINK_NOTICE' => "Derzeit ist <span class=\"notice\">rel="external"</span> für den Backlink gesetzt. Bitte nicht den Backlink eingebaut lassen und <strong>rel="nofollow"</strong> verwenden. Das schadet allen.",
+ 'INSTALLER_ENABLE_BACKLINK_NOTICE' => "<strong>Hinweis:</strong> Derzeit ist <span class=\"notice\">rel="external"</span> für den Backlink gesetzt. Bitte nicht den Backlink eingebaut lassen und <strong>rel="nofollow"</strong> verwenden. Das schadet allen.",
// Installation notes
'INSTALLER_BASE_PATH_NOTICE' => "Mit abschließendem /.",
- 'INSTALLER_BASE_URL_NOTICE' => "Ohne abschließendem /.",
+ 'INSTALLER_BASE_URL_NOTICE' => "Ohne abschließendem /.",
'INSTALLER_SMTP_HOST_NOTICE' => "Zum Beispiel <strong>mail.ihre-domain.example</strong>",
// AJAX title
- 'INSTALLER_AJAX_ERROR_TITLE' => "AJAX-Abfrage im Installer fehlgeschlagen",
+ 'INSTALLER_AJAX_ERROR_TITLE' => "AJAX-Abfrage im Installer fehlgeschlagen",
'INSTALLER_AJAX_WARNING_TITLE' => "Warnung: Es sind ungespeicherte Änderungen vorhanden",
- 'INSTALLER_AJAX_TEST_TITLE' => "AJAX-Testergebnis positiv",
+ 'INSTALLER_AJAX_TEST_TITLE' => "AJAX-Testergebnis positiv",
+ 'INSTALLER_AJAX_FINISH_TITLE' => "Installation läuft . . .",
// Installer switches
'INSTALLER_SWITCH_PLAIN' => "Kompatiblitätsmodus",
'INSTALLER_SWITCH_START' => "Zur Startseite zurückkehren ...",
- 'INSTALLER_SWITCH_AJAX' => "Zur "interaktiven" AJAX-Version ...",
+ 'INSTALLER_SWITCH_AJAX' => "Zur "interaktiven" AJAX-Version ...",
// SMTP input
// @TODO Move this to e.g. ext-smtp
// Post-Check - General failure messages
'INSTALLER_POST_CHECK_DATABASE_CONFIG_FAILED' => "Beim testweisen Aufbauen einer Datenbankverbindung ist ein Fehler entstanden: %s",
+ // Post-Check - Base configuration
+ 'INSTALLER_POST_BASE_PATH_INVALID' => "Der Basis-Pfad für Include-Dateien ist ungültig.",
+ 'INSTALLER_POST_BASE_URL_INVALID' => "Die Basis-URL ist ungültig.",
+ 'INSTALLER_POST_MAIN_TITLE_INVALID' => "Der {?mt_word?}-Titel ist zu kurz.",
+ 'INSTALLER_POST_SLOGAN_INVALID' => "Der Werbespruch ist zu kurz.",
+ 'INSTALLER_POST_EMAIL_INVALID' => "Die eMail-Adresse ist ungültig.",
+
// Post-Check - Database connection
'INSTALLER_POST_DATABASE_PASSWORD1_EMPTY' => "Das Passwort zur Datenbank ist leer, jedoch ist die Passwortwiederholung gesetzt.",
'INSTALLER_POST_DATABASE_PASSWORD2_EMPTY' => "Das Passwort zur Datenbank ist gesetzt, jedoch ist die Passwortwiederholung leer.",
// Final check on 'overview' page
'INSTALLER_OVERVIEW_FINAL_CHECK_FAILED' => "Leider kann die Installation nicht abgeschlossen werden, da nicht alle Angaben vollständig und korrekt sind.",
'INSTALLER_OVERVIEW_FINAL_CHECK_DONE' => "Die Installation kann nun abgeschlossen werden.",
+ 'INSTALLER_READY_TO_FINISH' => "Es wurden alle nötigen Daten zur Installation gesammelt. Sie können die Installation beginnen, indem Sie auf <strong>{--PAGE_FINISH_SUBMIT--}</strong> klicken. Es wird dann der Verlauf der Installation Ihnen angezeigt. Danach sollten Sie als erstes den ersten Administrator-Account anlegen, damit niemand Ihren {?mt_word?} übernehmen kann.",
+
+ // "Failed overview"
+ 'INSTALLER_OVERVIEW_FAILED_TITLE' => "Es sind nicht alle benötigten Daten zur Installation vorhanden",
+ 'INSTALLER_FAILED_FIELDS' => "Die folgenden Angaben entsprechen nicht den erwarteten Werten:",
+
+ // Failed checks on POST fields
+ 'INSTALLER_FIELD_FAILED_BASE_PATH' => "Der Basis-Pfad stimmt nicht (nicht lesbar, existiert nicht, verweist auf falsche Installation usw.).",
+ 'INSTALLER_FIELD_FAILED_BASE_URL' => "Die Basis-URL ist nicht richtig eingegeben worden.",
+ 'INSTALLER_FIELD_FAILED_MAIN_TITLE' => "Der Titel des {?mt_word3?} ist zu kurz (mindestens 4 Zeichen).",
+ 'INSTALLER_FIELD_FAILED_SLOGAN' => "Der Werbespruch ist zu kurz (mindestens 4 Zeichen) oder wurde nicht geändert.",
+ 'INSTALLER_FIELD_FAILED_WEBMASTER' => "Die EMail-Adresse der Webmaster-Adresse stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_MYSQL_HOST' => "Der Hostname für die Datenbankanbindung stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_MYSQL_DBASE' => "Der Datenbankname stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_MYSQL_PREFIX' => "Der Präfix ist leer.",
+ 'INSTALLER_FIELD_FAILED_MYSQL_ENGINE' => "Die Ausgewählte Engine wurde nicht erkannt.",
+ 'INSTALLER_FIELD_FAILED_MYSQL_LOGIN' => "Das Datenbanklogin stimmt nicht (leer).",
+ 'INSTALLER_FIELD_FAILED_MYSQL_PASSWORD1' => "Das erste Datenbankpasswort stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_MYSQL_PASSWORD2' => "Das zweite Datenbankpasswort stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_SMTP_HOST' => "Der SMTP-Hostname stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_SMTP_USER' => "Das SMTP-Login stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_SMTP_PASSWORD1' => "Das erste SMTP-Password stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_SMTP_PASSWORD2' => "Das zweite SMTP-Password stimmt nicht.",
+ 'INSTALLER_FIELD_FAILED_OUTPUT_MODE' => "Der Ausgabemodus wird nicht unterstützt.",
+ 'INSTALLER_FIELD_FAILED_WARN_NO_PASS' => "Es wurde weder <strong>Y</strong> noch <strong>N</strong> für 'WARN_NO_PASS' übergeben.",
+ 'INSTALLER_FIELD_FAILED_WRITE_FOOTER' => "Es wurde weder <strong>Y</strong> noch <strong>N</strong> für 'WRITE_FOOTER' übergeben.",
+ 'INSTALLER_FIELD_FAILED_ENABLE_BACKLINK' => "Es wurde weder <strong>Y</strong> noch <strong>N</strong> für 'ENABLE_BACKLINK' übergeben.",
));
// [EOF]
}
}
+// Imports given SQL dump from given (relative) path
+function importSqlDump ($path, $dumpName) {
+ // Construct FQFN
+ $FQFN = getPath() . $path . '/' . $dumpName . '.sql';
+
+ // Is the file readable?
+ if (!isFileReadable($FQFN)) {
+ // Not found, which is bad
+ reportBug(__FILE__, __LINE__, sprintf("SQL dump %s/%s.sql is not readable.", $path, $dumpName));
+ } // END - if
+
+ // Then read it
+ $fileContent = readSqlDump($FQFN);
+
+ // Merge it with existing SQL statements
+ mergeSqls(explode(";\n", $fileContent), 'install');
+}
+
// [EOF]
?>
// First is config
(
(
- isConfigEntrySet('MXCHANGE_INSTALLED')
+ isConfigEntrySet('MAILER_INSTALLED')
) && (
- getConfig('MXCHANGE_INSTALLED') == 'Y'
+ getConfig('MAILER_INSTALLED') == 'Y'
)
)
) || (
// Init variables
var currentTabId = null;
+var processDisplayed = false;
var errorDisplayed = false;
var warningDisplayed = false;
var defaultTabId = null;
// Marks a tab navigation entry
function markTabNavigation (prefix, tab) {
+ // Is process working?
+ if (processDisplayed == true) {
+ // Then exit silently
+ return;
+ } // END - if
+
// Get all li-tags
var li = document.getElementsByTagName('li');
// Enables a given footer navigation element
function enableFooterNavigationPage (element) {
// Remove the 'disabled' class and attribute
- enableElement('input#' + element + '_page');
+ if (element == 'finish') {
+ enableElement('input#finish');
+ } else {
+ enableElement('input#' + element + '_page');
+ disableElement('input#finish');
+ }
}
// Resets footer navigation by adding CSS class 'disabled'
// Is ajax_content set?
if (ajax_content.reply_content == undefined) {
// This shall not happen
- throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts.';
+ throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts. (1)';
} else if (ajax_content.reply_content == null) {
// This shall not happen, too
- throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts.';
+ throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts. (2)';
}
// Set AJAX reply
error: function (ajax_content) {
// Is ajax_content set?
if (ajax_content.reply_content == undefined) {
- // This shall not happen
- throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts.';
+ // Is 'responseText' there?
+ if (ajax_content.responseText != undefined) {
+ // Then parse it
+ var obj = jQuery.parseJSON(ajax_content.responseText.replace('%20', ' '));
+
+ // Is 'reply_content' set?
+ if (obj.reply_content == undefined) {
+ // This shall not happen
+ throw new 'obj.reply_content not returned from ajax.php, please fix your scripts. (3)';
+ } // END - if
+
+ // Set it
+ setAjaxReply(obj.reply_content, false);
+ return false;
+ } else {
+ // This shall not happen
+ throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts. (4)';
+ }
} else if (ajax_content.reply_content == null) {
// This shall not happen, too
- throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts.';
+ throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts. (5)';
}
// Set AJAX reply
// Enables footer navigation buttons
function enableFooterNavigation (prefix, tabId) {
+ // Is process working?
+ if (processDisplayed == true) {
+ // Then exit silently
+ return;
+ } // END - if
+
// Reset both footer navigation first
resetFooterNavigation();
// Requests an AJAX content
function requestAjaxContent (prefix, htmlId, tabId, footerNavigation) {
+ // Is process working?
+ if (processDisplayed == true) {
+ // Then exit silently
+ return;
+ } // END - if
+
// Check if this request is disabled
if ($('#' + prefix + '_' + tabId).hasClass('tab_disabled')) {
// Clicked on a disabled tabId so blur it
});
}
+// Displays the process window for given prefix and content
+function displayProcessWindow (prefix, ajax_content) {
+ // Fade out warning window, if open
+ //* DEBUG: */ alert('displayProcessWindow(): prefix=' + prefix + ' - calling closeWarningWindow()');
+ closeWarningWindow(prefix);
+
+ // Fade it out for eye-candy
+ closeErrorWindow(prefix);
+
+ // Fade it out for eye-candy
+ closeProcessWindow(prefix);
+
+ // Abort here if processDisplayed is still true
+ if (processDisplayed == true) {
+ // Make sure this doesn't happen
+ return;
+ } // END - if
+
+ // Copy the response text to the process variable
+ if (ajax_content.reply_content != undefined) {
+ $('#' + prefix + '_process_content').html(ajax_content.reply_content);
+ } else {
+ $('#' + prefix + '_process_content').html(ajax_content);
+ }
+
+ // Fade the process in
+ $('#' + prefix + '_process').fadeIn('slow', function() {
+ // Mark process as displayed
+ processDisplayed = true;
+ });
+}
+
// Waits until the window has been closed
function closeErrorLocked () {
// Has all been loaded?
}
}
+// Waits until the window has been closed
+function closeProcessLocked () {
+ // Has all been loaded?
+ if (processDisplayed == false) {
+ // Then release ready()
+ $.holdReady(false);
+ } else {
+ // Recursive call again
+ window.setTimeout('closeProcessLocked()', 10);
+ }
+}
+
// Closes an error window
function closeErrorWindow (prefix, waitClose, resetCurrentTabId) {
// Is the error displayed?
} // END - if
}
+// Closes an process window
+function closeProcessWindow (prefix, waitClose, resetCurrentTabId) {
+ // Is the process displayed?
+ if (processDisplayed == true) {
+ // Shall we wait ("sync") until the animation has completed?
+ if (waitClose == true) {
+ // Hold the ready status
+ $.holdReady(true);
+ } // END - if
+
+ // Yes, then fade it out
+ $('#' + prefix + '_process').fadeOut('fast', function() {
+ // Set current tab id to default
+ if (resetCurrentTabId == true) {
+ setCurrentTabId(defaultTabId);
+ } // END - if
+
+ // Mark it as closed
+ processDisplayed = false;
+ });
+
+ // Shall this animation be "synchronized"?
+ if (waitClose == true) {
+ // Wait for the window has been closed
+ closeProcessLocked();
+ } // END - if
+ } // END - if
+}
+
// Waits until the window has been closed
function closeWarningLocked () {
// Has all been loaded?
return;
} // END - if
+ // Is process working?
+ if (processDisplayed == true) {
+ // Then exit silently
+ return;
+ } // END - if
+
// Is there a 'next' entry?
//* DEBUG: */ alert('doFooterPage(): button=' + button + ',currentTabId=' + currentTabId + ',nextPage[currentTabId]=' + nextPage[currentTabId]);
if ((button == 'next') && (nextPage[currentTabId] != null)) {
// Saves changes by sending the data to the AJAX backend script
function saveChanges (prefix) {
+ // Is process working?
+ if (processDisplayed == true) {
+ // Then exit silently
+ return;
+ } // END - if
+
// Mark all elements as unchanged
markAllElementsAsUnchanged();
// Saves changed settings and continues with given tab
function doSaveChangesContinue (prefix, htmlId, tab) {
+ // Is process working?
+ if (processDisplayed == true) {
+ // Then exit silently
+ return;
+ } // END - if
+
// Save the changes
saveChanges(prefix);
* MA 02110-1301 USA
*/
+// Installation steps array
+var installSteps = new Array();
+
+// Init all installation steps
+installSteps[0] = '';
+installSteps[1] = '';
+installSteps[2] = '';
+installSteps[3] = '';
+
// Switches instaler by redirecting
function switchInstaller (installer) {
// Switch installer
document.location.href='install.php?installer=' + installer;
}
+
+// User has clicked on 'finish'
+function doFinishInstallation () {
+ // First disable all buttons button
+ disableElement('input#next_page');
+ disableElement('input#previous_page');
+ disableElement('input#finish');
+
+ // Display process window
+ displayProcessWindow('install', '');
+}
// These scripts shall be loaded
var scripts = new Array();
scripts[0] = '{%url,js=js/ajax-common.js%}';
-scripts[1] = '{%url,js=js/jquery-ui.custom.js%}';
+scripts[1] = '{%jquery,js=ui%}';
scripts[2] = '{%url,js=js/admin-data.js%}';
scripts[3] = '{%url,js=js/admin-common.js%}';
</div>
</div>
+<div id="install_process" class="ajax_process">
+ <div class="ajax_process_title">
+ <strong>{--INSTALLER_AJAX_FINISH_TITLE--}</strong>
+ </div>
+ <div class="ajax_process_close">
+ <strong id="install_process_close" style="padding-left:1.5px;cursor:wait">X</strong>
+ </div>
+ <div style="clear:both"></div>
+ <div class="ajax_process_content" id="install_process_content">
+ <!-- Content will be inserted here by AJAX //-->
+ </div>
+</div>
+
<div style="clear:both"></div>
<div class="install_content_container">
// These scripts shall be loaded
var scripts = new Array();
scripts[0] = '{%url,js=js/ajax-common.js%}';
-scripts[1] = '{%url,js=js/jquery-ui.custom.js%}';
+scripts[1] = '{%jquery,js=ui%}';
scripts[2] = '{%url,js=js/install-data.js%}';
scripts[3] = '{%url,js=js/install-common.js%}';
--- /dev/null
+<div align="center">
+<div class="install_title">
+ {--INSTALLER_OVERVIEW_FAILED_TITLE--}
+</div>
+
+<div class="para">
+ $content[message]
+</div>
+
+<div class="para">
+ {--INSTALLER_FAILED_FIELDS--}
+ $content[failed_fields]
+</div>
+</div>
<table border="0" cellspacing="0" cellpadding="0" class="install_content">
<tr>
<td colspan="2" align="center" class="install_title">
- {--INSTALLER_BASE_DATA_TITLE--}
+ {--INSTALLER_PAGE_BASE_DATA_TITLE--}
</td>
</tr>
<tr>
<table border="0" cellspacing="0" cellpadding="0" class="install_content">
<tr>
<td colspan="2" align="center" class="install_title">
- {--INSTALLER_DATABASE_CONFIG_TITLE--}
+ {--INSTALLER_PAGE_DATABASE_CONFIG_TITLE--}
</td>
</tr>
<tr>
<table border="0" cellspacing="0" cellpadding="0" class="install_content">
<tr>
<td colspan="2" align="center" class="install_title">
- {--INSTALLER_SMTP_CONFIG_TITLE--}
+ {--INSTALLER_PAGE_SMTP_CONFIG_TITLE--}
</td>
</tr>
<tr>
<table border="0" cellspacing="0" cellpadding="0" class="install_content">
<tr>
<td colspan="2" align="center" class="install_title">
- {--INSTALLER_OTHER_CONFIG_TITLE--}
+ {--INSTALLER_PAGE_OTHER_CONFIG_TITLE--}
</td>
</tr>
<tr>
<div align="center">
<div class="install_title">
- {--INSTALLER_BASE_DATA_TITLE--}
+ {--INSTALLER_PAGE_BASE_DATA_TITLE--}
</div>
<div class="para">
<div align="center">
<div class="install_title">
- {--INSTALLER_DATABASE_CONFIG_TITLE--}
+ {--INSTALLER_PAGE_DATABASE_CONFIG_TITLE--}
</div>
<div class="para">
</div>
<div class="para">
- Einen Augenblick, die Installation wird vorbereitet ...
+ {--INSTALLER_INIT_PLEASE_WAIT--}
</div>
-
</div>
<div align="center">
<div class="install_title">
- {--INSTALLER_OTHER_CONFIG_TITLE--}
+ {--INSTALLER_PAGE_OTHER_CONFIG_TITLE--}
</div>
<div class="para">
--- /dev/null
+<div align="center">
+<div class="install_title">
+ {--INSTALLER_PAGE_OVERVIEW_TITLE--}
+</div>
+
+<div class="para">
+ {--INSTALLER_READY_TO_FINISH--}
+</div>
+</div>
<div align="center">
<div class="install_title">
- {--INSTALLER_SMTP_CONFIG_TITLE--}
+ {--INSTALLER_PAGE_SMTP_CONFIG_TITLE--}
</div>
<div class="para">
if (loadScripts(scripts) == true) {
// Wait for loadScripts() finishing loading all scripts
$().ready(function () {
+ // Process window
+ $("#install_process").draggable({opacity: 0.85});
+
// Warning window
$("#install_warning").draggable({opacity: 0.85});
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-// Make both windows drag'n'drop-able
+
+// Initialize all navigations
$().ready(function() {
// Fade default content in
window.setTimeout("requestAjaxContent('install', 'install_content', '$content[install_page]', true)", 250);
//-----------------------------------------
// Footer navigation
//-----------------------------------------
+ $('#finish').click(function () {
+ // 'finish' button has been clicked
+ doFinishInstallation();
+ });
+
$('#next_page').click(function () {
// 'next' button has been clicked
doFooterPage('install', 'install_content', 'next');
//-----------------------------------------
// Drag'N'Drop
//-----------------------------------------
+ $('#install_process').draggable({
+ opacity: 0.85
+ });
+
$('#install_warning').draggable({
opacity: 0.85
});
ul#tabnav {
list-style-type: none;
margin: 0px;
- padding-left: 30px;
+ padding-left: 20px;
padding-bottom: 24px;
z-index: 0;
}
color: #e0e0e0;
}
-.ajax_error, .ajax_warning {
+.ajax_error, .ajax_warning, .ajax_process {
+ border: 1px solid #ffffff;
z-index: 200;
min-height: 10px;
overflow: visible;
background-color: #999900;
}
-.ajax_error_title, .ajax_warning_title {
+.ajax_process {
+ background-color: #009900;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_process_title {
border: 1px solid #ffffff;
padding: 3px;
color: #ffffff;
background-color: #bbbb00;
}
-.ajax_error_close, .ajax_warning_close {
+.ajax_process_title {
+ background-color: #0000dd;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_process_close {
border: 1px solid #ffffff;
float: right;
width: 10px;
min-height: 10x;
margin-left: 5px;
padding: 3px;
- color: #ffffff;
text-align: center;
}
.ajax_error_close {
+ color: #ffffff;
background-color: #bb0000;
}
.ajax_warning_close {
+ color: #ffffff;
background-color: #bbbb00;
}
-.ajax_error_content, .ajax_warning_content {
+.ajax_process_close {
+ color: #c0c0c0;
+ background-color: #0000dd;
+ cursor: wait;
+}
+
+.ajax_error_content, .ajax_warning_content, .ajax_process_content {
width: 470px;
border: 1px solid #ffffff;
margin-top: 5px;
ul#tabnav {
list-style-type: none;
margin: 0px;
- padding-left: 30px;
+ padding-left: 20px;
padding-bottom: 24px;
z-index: 0;
}
color: #e0e0e0;
}
-.ajax_error, .ajax_warning {
+.ajax_error, .ajax_warning, .ajax_process {
+ border: 1px solid #ffffff;
z-index: 200;
min-height: 10px;
overflow: visible;
background-color: #999900;
}
-.ajax_error_title, .ajax_warning_title {
+.ajax_process {
+ background-color: #0000aa;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_process_title {
border: 1px solid #ffffff;
padding: 3px;
color: #ffffff;
background-color: #bbbb00;
}
-.ajax_error_close, .ajax_warning_close {
+.ajax_process_title {
+ background-color: #0000dd;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_process_close {
border: 1px solid #ffffff;
float: right;
width: 10px;
min-height: 10x;
margin-left: 5px;
padding: 3px;
- color: #ffffff;
text-align: center;
}
.ajax_error_close {
+ color: #ffffff;
background-color: #bb0000;
}
.ajax_warning_close {
+ color: #ffffff;
background-color: #bbbb00;
}
+.ajax_process_close {
+ color: #c0c0c0;
+ background-color: #0000dd;
+ cursor: wait;
+}
+
.ajax_error_message {
}
-.ajax_error_content, .ajax_warning_content {
+.ajax_error_content, .ajax_warning_content, .ajax_process_content {
width: 470px;
border: 1px solid #ffffff;
margin-top: 5px;
ul#tabnav {
list-style-type: none;
margin: 0px;
- padding-left: 30px;
+ padding-left: 20px;
padding-bottom: 24px;
z-index: 0;
}
color: #e0e0e0;
}
-.ajax_error, .ajax_warning {
+.ajax_error, .ajax_warning, .ajax_process {
+ border: 1px solid #ffffff;
z-index: 200;
min-height: 10px;
overflow: visible;
background-color: #999900;
}
-.ajax_error_title, .ajax_warning_title {
+.ajax_process {
+ background-color: #009900;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_process_title {
border: 1px solid #ffffff;
padding: 3px;
color: #ffffff;
background-color: #bbbb00;
}
-.ajax_error_close, .ajax_warning_close {
+.ajax_process_title {
+ background-color: #0000dd;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_process_close {
border: 1px solid #ffffff;
float: right;
width: 10px;
}
.ajax_error_close {
+ color: #ffffff;
background-color: #bb0000;
}
.ajax_warning_close {
+ color: #ffffff;
background-color: #bbbb00;
}
+.ajax_process_close {
+ color: #c0c0c0;
+ background-color: #0000dd;
+ cursor: wait;
+}
+
.ajax_error_message {
}
-.ajax_error_content, .ajax_warning_content {
+.ajax_error_content, .ajax_warning_content, .ajax_process_content {
width: 470px;
border: 1px solid #ffffff;
margin-top: 5px;
ul#tabnav {
list-style-type: none;
margin: 0px;
- padding-left: 30px;
+ padding-left: 20px;
padding-bottom: 24px;
z-index: 0;
}
color: #e0e0e0;
}
-.ajax_error, .ajax_warning {
+.ajax_error, .ajax_warning, .ajax_process {
+ border: 1px solid #ffffff;
z-index: 200;
min-height: 10px;
overflow: visible;
background-color: #999900;
}
-.ajax_error_title, .ajax_warning_title {
+.ajax_process {
+ background-color: #0000aa;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_process_title {
border: 1px solid #ffffff;
padding: 3px;
color: #ffffff;
background-color: #bbbb00;
}
-.ajax_error_close, .ajax_warning_close {
+.ajax_process_title {
+ background-color: #0000dd;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_process_close {
border: 1px solid #ffffff;
float: right;
width: 10px;
}
.ajax_error_close {
+ color: #ffffff;
background-color: #bb0000;
}
.ajax_warning_close {
+ color: #ffffff;
background-color: #bbbb00;
}
+.ajax_process_close {
+ color: #c0c0c0;
+ background-color: #0000dd;
+ cursor: wait;
+}
+
.ajax_error_message {
}
-.ajax_error_content, .ajax_warning_content {
+.ajax_error_content, .ajax_warning_content, .ajax_process_content {
width: 470px;
border: 1px solid #ffffff;
margin-top: 5px;