]> git.mxchange.org Git - mailer.git/blobdiff - modules.php
Fix for parser error
[mailer.git] / modules.php
index 71a861f0cd1b0be15ef48d4a2cfc81bd0f39ef7d..b8b9705bfe467c8eb0bbc23d48976bf4bedc1347 100644 (file)
 // Load security stuff here
 require('inc/libs/security_functions.php');
 
-// Init "action" and "what"
+// Init start time
 $GLOBALS['startTime'] = microtime(true);
+
+// Init output mode and module
 $GLOBALS['output_mode'] = 0;
-$GLOBALS['what']   = '';
-$GLOBALS['action'] = '';
 $GLOBALS['module'] = '';
 
 // Needed include files
@@ -58,8 +58,8 @@ if (!REQUEST_ISSET_GET('module')) REQUEST_SET_GET('module', 'index');
 // Check if logged in
 if (IS_MEMBER()) {
        // Is still logged in so we welcome him with his name
-       $result = SQL_QUERY_ESC("SELECT surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-       array(getUserId()), __FILE__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1",
+               array(getUserId()), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load surname and family's name and build the username
                list($s, $f) = SQL_FETCHROW($result);
@@ -107,9 +107,10 @@ if ((getConfig('maintenance') == 'Y') && (!IS_ADMIN()) && ($GLOBALS['module'] !=
        $check = checkModulePermissions($GLOBALS['module']);
        switch ($check)
        {
-               case 'admin_only':
-               case 'mem_only':
-               case 'done':
+               case 'cache_miss': // The cache is gone
+               case 'admin_only': // Admin-only access
+               case 'mem_only': // Member-only access
+               case 'done': // All fine!
                        // Does the module exists on local file system?
                        if ((isFileReadable(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
                                // Module is valid, active and located on the local disc...