Checking for admin ACL now as filter
[mailer.git] / inc / modules / admin.php
index cccd51af5adeb4efed3c25cc53f7045cdf09e239..1c58a7b53eadfbce3112962e32662bf2016feb8b 100644 (file)
@@ -334,20 +334,8 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                // Cookie-Data accepted
                if ((set_session("admin_md5", get_session('admin_md5'))) && (set_session("admin_login", get_session('admin_login'))) && (set_session("admin_last", time())) && (set_session("admin_to", bigintval(get_session('admin_to'))))) {
                        // Ok, Cookie-Update done
                // Cookie-Data accepted
                if ((set_session("admin_md5", get_session('admin_md5'))) && (set_session("admin_login", get_session('admin_login'))) && (set_session("admin_last", time())) && (set_session("admin_to", bigintval(get_session('admin_to'))))) {
                        // Ok, Cookie-Update done
-                       if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
-                               // Check if action GET variable was set
-                               $act = SQL_ESCAPE($GLOBALS['action']);
-                               if (!empty($GLOBALS['what'])) {
-                                       // Get action value by what-value
-                                       $act = GET_ACTION("admin", $GLOBALS['what']);
-                               }
-
-                               // Check for access control line of current menu entry
-                               define('__ACL_ALLOW', ADMINS_CHECK_ACL($act, $GLOBALS['what']));
-                       } else {
-                               // Extension not installed so it's always allowed to access everywhere!
-                               define('__ACL_ALLOW', true);
-                       }
+                       // Check for access control line of current menu entry
+                       define('__ACL_ALLOW', RUN_FILTER('check_admin_acl'));
 
                        // When type of admin menu is not set fallback to old menu system
                        if (getConfig('admin_menu') == null) $_CONFIG['admin_menu'] = "OLD";
 
                        // When type of admin menu is not set fallback to old menu system
                        if (getConfig('admin_menu') == null) $_CONFIG['admin_menu'] = "OLD";