Exemplo n.º 1
0
 /**
 Filters an array of request arrays to return the allowed requests only for the current user.
 @param arg_arr_requests array of all available requests.
 @return an array of allowed requests only for the current user.
 @see is_request_allowed().
 @see get_allowed_links().
 @see is_request_allowed().
 @access Public.
 */
 public static function get_allowed_requests($arg_arr_requests)
 {
     global $__in, $__out;
     $arr_allowed_requests = array();
     if (!is_array($arg_arr_requests)) {
         return array();
     }
     while (list(, $request) = each($arg_arr_requests)) {
         if (!$request) {
             $arr_allowed_requests[] = array();
         } else {
             if (dispatcher::is_request_allowed($request)) {
                 $arr_allowed_requests[] = $request;
             }
             // if request is allowed then add it to the array of requests
         }
     }
 }