From 2271b257e04ecbecf1c1e9fe91cd948b50e1ded4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 1 Mar 2009 03:06:06 +0000 Subject: [PATCH] Fixes for MT_WORD vs. install vs. installed --- inc/filters.php | 7 ------- inc/functions.php | 4 ++-- inc/install-inc.php | 3 +++ inc/language.php | 2 +- inc/mysql-connect.php | 3 +++ 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/inc/filters.php b/inc/filters.php index ebed4a6034..64de90acd5 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -103,7 +103,6 @@ ORDER BY `filter_id` ASC", __FILE__, __LINE__); // Init filters REGISTER_FILTER('init', 'UPDATE_LOGIN_DATA'); REGISTER_FILTER('init', 'INIT_RANDOMIZER'); - REGISTER_FILTER('init', 'INIT_MEM_CACHE'); // Login failures handler REGISTER_FILTER('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES'); @@ -506,11 +505,5 @@ function FILTER_INIT_RANDOMIZER () { mt_srand(generateSeed() + constant('_ADD')); } -// Filter for initializing misc mem-cache arrays (NOT memcache!) -function FILTER_INIT_MEM_CACHE () { - // For LOAD_INC_ONCE() - $GLOBALS['cache_array']['load_once'] = array(); -} - // ?> diff --git a/inc/functions.php b/inc/functions.php index 7d96a7ed02..d9e2c4ad7c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2603,12 +2603,12 @@ function LOAD_INC ($INC) { // Loads an include file once function LOAD_INC_ONCE ($INC) { // Is it not loaded? - if (!isset($GLOBALS['cache_array']['load_once'][$INC])) { + if (!isset($GLOBALS['load_once'][$INC])) { // Then try to load it LOAD_INC($INC); // And mark it as loaded - $GLOBALS['cache_array']['load_once'][$INC] = "loaded"; + $GLOBALS['load_once'][$INC] = "loaded"; } // END - if } diff --git a/inc/install-inc.php b/inc/install-inc.php index 065726a9d2..b7ed234cea 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -41,6 +41,9 @@ if (!defined('__SECURITY')) { require($INC); } +// Load sql_patches here +LOAD_EXTENSION("sql_patches"); + // Init variables $mysql = ""; if ((REQUEST_ISSET_POST(('mysql'))) && (is_array(REQUEST_POST('mysql')))) $mysql = REQUEST_POST('mysql'); diff --git a/inc/language.php b/inc/language.php index 0c10b17787..61681eec05 100644 --- a/inc/language.php +++ b/inc/language.php @@ -58,7 +58,7 @@ if (!FILE_READABLE($FQFN)) { } // END - if // Load language file -LOAD_INC($INC); +LOAD_INC_ONCE($INC); // Check for installation mode if (isInstalling()) { diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index e354d7c9c6..8c9f3c3312 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -231,6 +231,9 @@ if ((!isInstalling()) && (isInstalled())) { addFatalMessage(getMessage('SECRET_IS_WRITE_PROTECTED')); } // END - if } // END - if + + // Run the init filter chain + RUN_FILTER('init'); } if ((getTotalFatalErrors() > 0) && (isInstalled()) && (!defined('mxchange_installing')) && ($GLOBALS['output_mode'] != "1")) { -- 2.30.2