-//
-function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false)
-{
+
+// Validate the given menu action
+function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
+ global $cacheArray;
+
+ // Is the cache entry there and we shall not update?
+ if ((isset($cacheArray['action_valid'][$MODE][$act][$wht])) && ($UPDATE === false)) {
+ // Count cache hit
+ incrementConfigEntry('cache_hits');
+
+ // Then use this cache
+ return $cacheArray['action_valid'][$MODE][$act][$wht];
+ } // END - if
+
+ // By default nothing is valid