X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Finstall-inc.php;h=5a93e2d0e798eddb84a44d54c8023aa66d549b4d;hb=449003a0cf1cf2434ef63e4b7d39685ba3804786;hp=84d5e0c1076a3170647b5971baafeef3bc1494d2;hpb=c86dd01c6e0801b7f6fabefc659972e78bd04759;p=mailer.git
diff --git a/inc/install-inc.php b/inc/install-inc.php
index 84d5e0c107..5a93e2d0e7 100644
--- a/inc/install-inc.php
+++ b/inc/install-inc.php
@@ -18,6 +18,7 @@
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -45,45 +46,54 @@ if (!defined('__SECURITY')) {
die();
} // END - if
+// Load extension timezone
+loadExtension('timezone', 'test');
+
+// Set config entry
+setConfigEntry('timezone', 'Europe/Berlin');
+
+// And init timezone
+FILTER_INIT_TIMEZONE();
+
// Init variables
-$mysql = array();
-if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) {
+$GLOBALS['install_mysql'] = array();
+if ((isPostRequestParameterSet('mysql')) && (is_array(postRequestParameter('mysql')))) {
// Transfer 'mysql' array
- $mysql = postRequestElement('mysql');
+ $GLOBALS['install_mysql'] = postRequestParameter('mysql');
} // END - if
// Check if both passwords from SMTP are matching
-if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) {
+if ((isGetRequestParameterSet('page') && (getRequestParameter('page') == 5))) {
// Okay, we have to check it
- if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) {
+ if (isPostRequestParameterSet('smtp_user') && (!isPostRequestParameterSet('smtp_host'))) {
// Hostname not set
- addToInstallContent(getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . ' ');
- setRequestGetElement('page', 3);
+ addToInstallContent('
{--INSTALL_SMTP_HOSTNAME_EMPTY--}
');
+ setGetRequestParameter('page', 3);
} // END - if
- if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) {
+ if ((!isPostRequestParameterSet('smtp_pass1')) && (isPostRequestParameterSet('smtp_pass2'))) {
// Password is empty
- addToInstallContent(getMessage('INSTALL_SMTP_PASS1_EMPTY') . ' ');
- setRequestGetElement('page', 3);
+ addToInstallContent('
{--INSTALL_SMTP_PASS1_EMPTY--}
');
+ setGetRequestParameter('page', 3);
} // END - if
- if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) {
+ if ((isPostRequestParameterSet('smtp_pass1')) && (!isPostRequestParameterSet('smtp_pass2'))) {
// Password repeat is empty
- addToInstallContent(getMessage('INSTALL_SMTP_PASS2_EMPTY') . ' ');
- setRequestGetElement('page', 3);
+ addToInstallContent('
{--INSTALL_SMTP_PASS2_EMPTY--}
');
+ setGetRequestParameter('page', 3);
} // END - if
- if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) {
+ if (postRequestParameter('smtp_pass1') != postRequestParameter('smtp_pass1')) {
// Passwords are not matching
- addToInstallContent(getMessage('INSTALL_SMTP_PASS_MISMATCH') . ' ');
- setRequestGetElement('page', 3);
+ addToInstallContent('
{--INSTALL_SMTP_PASS_MISMATCH--}
');
+ setGetRequestParameter('page', 3);
} // END - if
} // END - if
// Is the mailer installed or no admin registered so far?
if ((!isInstalled()) || (!isAdminRegistered())) {
// Output page for entered value
- switch (getRequestElement('page')) {
+ switch (getRequestParameter('page')) {
case 'welcome': // Welcome to the installation!
addTemplateToInstallContent('install_welcome');
break;
@@ -94,28 +104,29 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
break;
case '2': // MySQL data (alone!)
- if (empty($mysql['dbase'])) $mysql['dbase'] = 'your_database';
- if (empty($mysql['login'])) $mysql['login'] = 'your_login';
- if (empty($mysql['host'])) $mysql['host'] = 'localhost';
- if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange';
- if (empty($mysql['type'])) $mysql['type'] = 'MyISAM';
- if (getTotalFatalErrors() > 0) {
- addToInstallContent('');
+ if (empty($GLOBALS['install_mysql']['dbase'])) $GLOBALS['install_mysql']['dbase'] = 'your_database';
+ if (empty($GLOBALS['install_mysql']['login'])) $GLOBALS['install_mysql']['login'] = 'your_login';
+ if (empty($GLOBALS['install_mysql']['host'])) $GLOBALS['install_mysql']['host'] = 'localhost';
+ if (empty($GLOBALS['install_mysql']['prefix'])) $GLOBALS['install_mysql']['prefix'] = 'mxchange';
+ if (empty($GLOBALS['install_mysql']['type'])) $GLOBALS['install_mysql']['type'] = 'MyISAM';
+ if (ifFatalErrorsDetected()) {
+ addToInstallContent('