]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
is now located in ['config']
[mailer.git] / inc / filters.php
index 6d92d6a654f5e97f0e997f881818876cb2f3304e..6d02e30e8409261650cab20ce3669268ccf6b6a2 100644 (file)
@@ -329,8 +329,8 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) {
        $content = $data;
 
        // Handle failed logins here if not in guest
-       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$data['access_level']}<br />\n";
-       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) {
+       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={getAction()},what={getWhat()},lvl={$data['access_level']}<br />\n";
+       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) {
                // Handle failure
                $content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']);
        } // END - if
@@ -468,7 +468,7 @@ function FILTER_UPDATE_LOGIN_DATA () {
                list($mod, $onl) = SQL_FETCHROW($result);
 
                // Maybe first login time?
-               if (empty($mod)) $mod = "login";
+               if (empty($mod)) $mod = 'login';
 
                // This will be displayed on welcome page! :-)
                if (empty($GLOBALS['last']['module'])) {
@@ -476,15 +476,15 @@ function FILTER_UPDATE_LOGIN_DATA () {
                } // END - if
 
                // 'what' not set?
-               if (empty($GLOBALS['what'])) {
+               if (!isWhatSet()) {
                        // Fix it to default
-                       $GLOBALS['what'] = "welcome";
-                       if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
+                       setWhat('welcome');
+                       if (getConfig('index_home') != '') setWhatFromConfig('index_home');
                } // END - if
 
                // Update last module / online time
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
-                       array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
+                       array(getWhat(), detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
        }  else {
                // Destroy session, we cannot update!
                destroyUserSession();
@@ -502,14 +502,14 @@ function FILTER_CHECK_ADMIN_ACL () {
        // Ok, Cookie-Update done
        if ((GET_EXT_VERSION('admins') >= '0.3.0') && (EXT_IS_ACTIVE('admins'))) {
                // Check if action GET variable was set
-               $action = SQL_ESCAPE($GLOBALS['action']);
-               if (!empty($GLOBALS['what'])) {
+               $action = getAction();
+               if (isWhatSet()) {
                        // Get action value by what-value
-                       $action = getModeAction('admin', $GLOBALS['what']);
+                       $action = getModeAction('admin', getWhat());
                } // END - if
 
                // Check for access control line of current menu entry
-               $ret = adminsCheckAdminAcl($action, $GLOBALS['what']);
+               $ret = adminsCheckAdminAcl($action, getWhat());
        } // END - if
 
        // Return result