Moved filter function back to filters.php, fix for non-installed ext-sql_patches
[mailer.git] / inc / filters.php
index 4380a52ba341912cd0b7f7ff4bbb2ae0bf349350..c90cdea9be9e0a8415ab65e87fb65a53da0e35fa 100644 (file)
@@ -659,5 +659,27 @@ function FILTER_LOAD_RUNTIME_INCLUDES () {
        //* DEBUG: */ die();
 }
 
        //* DEBUG: */ die();
 }
 
+// Filter for checking admin ACL
+function FILTER_CHECK_ADMIN_ACL () {
+       // Extension not installed so it's always allowed to access everywhere!
+       $ret = true;
+
+       // Ok, Cookie-Update done
+       if ((isExtensionInstalledAndNewer('admins', '0.3.0')) && (isExtensionActive('admins'))) {
+               // Check if action GET variable was set
+               $action = getAction();
+               if (isWhatSet()) {
+                       // Get action value by what-value
+                       $action = getModeAction('admin', getWhat());
+               } // END - if
+
+               // Check for access control line of current menu entry
+               $ret = adminsCheckAdminAcl($action, getWhat());
+       } // END - if
+
+       // Set it here
+       $GLOBALS['acl_allow'] = $ret;
+}
+
 // [EOF]
 ?>
 // [EOF]
 ?>