From 4b49c5157a0fed6ec67689affb3c9f330216a687 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 26 Sep 2010 01:02:43 +0000 Subject: [PATCH] Module data now correctly set in 'cache_array' --- inc/module-functions.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/inc/module-functions.php b/inc/module-functions.php index a5659b906f..58ae31fc54 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -143,8 +143,14 @@ function isModuleRegistered ($module) { array($module), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Read data - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Entry found.'); - $GLOBALS['cache_array']['modules'][$module] = SQL_FETCHARRAY($result); + $data = SQL_FETCHARRAY($result); + + // Set all entries + foreach ($data as $key=>$value) { + $GLOBALS['cache_array']['modules'][$key][$module] = $value; + } // END - foreach + + // Mark as found $found = true; } elseif (isDebugModeEnabled()) { // Debug message only in debug-mode... @@ -223,12 +229,12 @@ function checkModulePermissions ($module = '') { setModuleStatus($module_chk, 'admin_only'); } else { // @TODO Nothing helped??? - logDebugMessage(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,hidden=%s,admin=%s,mem=%s", + logDebugMessage(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,hidden=%s,mem=%s,admin=%s", getModuleStatus($module_chk), $GLOBALS['cache_array']['modules']['locked'][$module_chk], $GLOBALS['cache_array']['modules']['hidden'][$module_chk], - $GLOBALS['cache_array']['modules']['admin_only'][$module_chk], - $GLOBALS['cache_array']['modules']['mem_only'][$module_chk] + $GLOBALS['cache_array']['modules']['mem_only'][$module_chk], + $GLOBALS['cache_array']['modules']['admin_only'][$module_chk] )); } } // END - if -- 2.39.5