X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmysql-connect.php;h=5cd6a3cf45277990ba93d498c8da49ef1fe61e85;hp=77eb4bb074d33739ebbd9d06ebbffb458c45abcc;hb=8cab12aa2bd0bd1de03a377b37cd42faae64b0e1;hpb=12cb1277f6f069b1cf9d536f9add2cd7e62eace4 diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 77eb4bb074..5cd6a3cf45 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,6 +40,9 @@ if (!defined('__SECURITY')) { die(); } // END - if +// Init array +$__functions = array(); + // Init include file array as it follows same naming scheme foreach ( array( 'stats', @@ -50,22 +53,27 @@ foreach ( array( 'request', 'session', 'code', + 'pool', 'language', 'sql', 'expression', 'filter', 'revision', 'extensions') as $lib) { - // Load special functions - loadIncludeOnce('inc/' . $lib . '-functions.php'); + + // Add it + array_push($__functions, $lib . '-functions'); } // END - foreach // Load more function libraries or includes -foreach (array('filters', 'mysql-manager', 'handler') as $lib) { +foreach (array_merge($__functions, array('filters', 'mysql-manager', 'handler')) as $lib) { // Load special functions loadIncludeOnce('inc/' . $lib . '.php'); } // END - foreach +// Remove array +unset($__functions); + // Set error handler set_error_handler('__errorHandler'); @@ -96,7 +104,7 @@ initRepositoryData(); enableTemplateHtml(); // Are we in installation phase? -if ((!isInstalling()) && (!isInstallationPhase())) { +if ((!isInstaller()) && (isInstalled())) { // Load configuration file(s) here loadIncludeOnce('inc/load_config.php'); @@ -124,6 +132,9 @@ if ((!isInstalling()) && (!isInstallationPhase())) { // CFG: DATABASE-TYPE setConfigEntry('_DB_TYPE', 'mysql3'); + // Set link as down + unsetSqlLinkUp(__FILE__, __LINE__); + // Load database layer here loadIncludeOnce('inc/db/lib.php'); @@ -132,7 +143,7 @@ if ((!isInstalling()) && (!isInstallationPhase())) { // Include more foreach (array('databases', 'session', 'versions', 'install-functions', 'load_config', 'load_cache') as $inc) { - // Load the include + // Load include file loadIncludeOnce('inc/' . $inc . '.php'); } // END - foreach