X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Finstall-inc.php;h=28db1db9a3087b9639cc8186125a1ca15c562fd0;hb=2dac220ef1018726eab4d8e20bb0682b609f067e;hp=d0e49a6f41ba06f2f45695109a9fa9b77ae86d94;hpb=c3b4eaf29946349ff058691db2dcb615a5379bb2;p=mailer.git diff --git a/inc/install-inc.php b/inc/install-inc.php index d0e49a6f41..28db1db9a3 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -35,12 +35,8 @@ * MA 02110-1301 USA * ************************************************************************/ -/************************************************************************ - * YOU MAY ALSO WANT TO REMOVE THIS FILE AFTER INSTALLTION! * - ************************************************************************/ - // Some security stuff... -if (!defined('__SECURITY')) { +if ((!defined('__SECURITY')) || (!isInstallationPhase())) { die(); } // END - if @@ -51,47 +47,47 @@ loadExtension('timezone', 'test'); setConfigEntry('timezone', 'Europe/Berlin'); // And init timezone -FILTER_INIT_TIMEZONE(); +FILTER_INIT_TIMEZONE(array()); // Init variables $GLOBALS['install_mysql'] = array(); -if ((isPostRequestParameterSet('mysql')) && (is_array(postRequestParameter('mysql')))) { +if ((isPostRequestElementSet('mysql')) && (ifPostContainsSelections('mysql'))) { // Transfer 'mysql' array - $GLOBALS['install_mysql'] = postRequestParameter('mysql'); + $GLOBALS['install_mysql'] = postRequestElement('mysql'); } // END - if // Check if both passwords from SMTP are matching -if ((isGetRequestParameterSet('page') && (getRequestParameter('page') == 5))) { +if ((isGetRequestElementSet('install_page') && (getRequestElement('install_page') == 5))) { // Okay, we have to check it - if (isPostRequestParameterSet('smtp_user') && (!isPostRequestParameterSet('smtp_host'))) { + if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) { // Hostname not set - addToInstallContent('
{--INSTALL_SMTP_HOSTNAME_EMPTY--}
'); - setGetRequestParameter('page', 3); + addToInstallContent('
{--INSTALLER_SMTP_HOSTNAME_EMPTY--}
'); + setGetRequestElement('install_page', 3); } // END - if - if ((!isPostRequestParameterSet('smtp_pass1')) && (isPostRequestParameterSet('smtp_pass2'))) { + if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) { // Password is empty - addToInstallContent('
{--INSTALL_SMTP_PASS1_EMPTY--}
'); - setGetRequestParameter('page', 3); + addToInstallContent('
{--INSTALLER_SMTP_PASSWORD1_EMPTY--}
'); + setGetRequestElement('install_page', 3); } // END - if - if ((isPostRequestParameterSet('smtp_pass1')) && (!isPostRequestParameterSet('smtp_pass2'))) { + if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) { // Password repeat is empty - addToInstallContent('
{--INSTALL_SMTP_PASS2_EMPTY--}
'); - setGetRequestParameter('page', 3); + addToInstallContent('
{--INSTALLER_SMTP_PASSWORD2_EMPTY--}
'); + setGetRequestElement('install_page', 3); } // END - if - if (postRequestParameter('smtp_pass1') != postRequestParameter('smtp_pass1')) { + if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) { // Passwords are not matching - addToInstallContent('
{--INSTALL_SMTP_PASS_MISMATCH--}
'); - setGetRequestParameter('page', 3); + addToInstallContent('
{--INSTALLER_SMTP_PASS_MISMATCH--}
'); + setGetRequestElement('install_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 (getRequestParameter('page')) { + switch (getRequestElement('install_page')) { case 'welcome': // Welcome to the installation! addTemplateToInstallContent('install_welcome'); break; @@ -105,7 +101,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { 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']['prefix'])) $GLOBALS['install_mysql']['prefix'] = 'mailer'; if (empty($GLOBALS['install_mysql']['type'])) $GLOBALS['install_mysql']['type'] = 'MyISAM'; if (ifFatalErrorsDetected()) { addToInstallContent('