From e6c2226d9fce4452118cf6fe68bab72e6623cc2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 23 Feb 2009 17:30:13 +0000 Subject: [PATCH] Last references to now replaced with mergeConfig() --- inc/functions.php | 6 ++++++ inc/libs/yoomedia_functions.php | 4 +--- inc/modules/admin/admin-inc.php | 4 +--- inc/modules/admin/what-config_primera.php | 3 +-- inc/modules/admin/what-config_wernis.php | 3 +-- inc/mysql-connect.php | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index ffdcd76a16..591a56c702 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2835,6 +2835,12 @@ function IF_APACHE_MODULE_LOADED ($apacheModule) { return (((function_exists('apache_get_modules')) && (in_array($apacheModule, apache_get_modules()))) || (!function_exists('apache_get_modules'))); } +// Merges $_CONFIG with data in given array +function mergeConfig ($newConfig) { + global $_CONFIG; + $_CONFIG = merge_array($_CONFIG, $newConfig); +} + // Getter for $_CONFIG entries function getConfig ($entry) { global $_CONFIG; diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 4b234a2463..9307272432 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -39,8 +39,6 @@ if (!defined('__SECURITY')) { // Test if the extension settings did work function YOOMEDIA_TEST_CONFIG ($data) { - global $_CONFIG; - // Is this admin? if (!IS_ADMIN()) { // No admin! @@ -48,7 +46,7 @@ function YOOMEDIA_TEST_CONFIG ($data) { } // END - if // Transfer config data - $_CONFIG = merge_array($_CONFIG, $data); + mergeConfig($data); // Temporary allow maximum setConfigEntry('yoomedia_tm_max_reload' , 1000); diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 4d11ed13fe..4493fca815 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -1214,10 +1214,8 @@ function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filter // Checks proxy settins by fetching check-updates3.php from www.mxchange.org function ADMIN_TEST_PROXY_SETTINGS ($settingsArray) { - global $_CONFIG; - // Set temporary the new settings - $_CONFIG = merge_array($_CONFIG, $settingsArray); + mergeConfig($settingsArray); // Now get the test URL $content = GET_URL("check-updates3.php"); diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index 3a8d0da5c2..ea836b6fcf 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -42,8 +42,7 @@ ADD_DESCR("admin", __FILE__); if (isset($_POST['ok'])) { // First merge temporarily the new API data into the current config - global $_CONFIG; - $_CONFIG = merge_array($_CONFIG, $_POST); + mergeConfig($_POST); // Is the password set? if (isset($_POST['pass'])) { diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index cfa9132c55..b92afc06d5 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -42,8 +42,7 @@ ADD_DESCR("admin", __FILE__); if (isset($_POST['ok'])) { // First merge temporarily the new API data into the current config - global $_CONFIG; - $_CONFIG = merge_array($_CONFIG, $_POST); + mergeConfig($_POST); // Let's test the API first (hold your horses here, cowboy! Thank you. :) ) if (WERNIS_TEST_API()) { diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index eb0d02cac1..966f799f56 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -159,7 +159,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT unset($MySQL); // Load configuration stuff - $_CONFIG = merge_array($_CONFIG, LOAD_CONFIG()); + mergeConfig(LOAD_CONFIG()); // Load "databases" aka static arrays LOAD_INC_ONCE("inc/databases.php"); -- 2.39.2