]> git.mxchange.org Git - mailer.git/commitdiff
Module data now correctly set in 'cache_array'
authorRoland Häder <roland@mxchange.org>
Sun, 26 Sep 2010 01:02:43 +0000 (01:02 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Sep 2010 01:02:43 +0000 (01:02 +0000)
inc/module-functions.php

index a5659b906fac960cbb662fe2721a208ea89c0ebf..58ae31fc548476a4ffe9733e8ff086ddef1c544d 100644 (file)
@@ -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