function get_modules_permissions

7.x misc.inc get_modules_permissions()
6.x misc.inc get_modules_permissions()
4.x misc.inc get_modules_permissions()
5.x misc.inc get_modules_permissions()

This function will read through all the modules' permissions and return back an array. Specifically, it retrieves arrays from each modules' hook_perm() function.

File

includes/misc.inc, line 2972
This file contains misc functions for FlightPath

Code

function get_modules_permissions() {
  $rtn = array();


  foreach ($GLOBALS ["fp_system_settings"]["modules"] as $module => $value) {

    if (isset($value ["disabled"]) && $value ["disabled"] == "yes") {
      // Module is not enabled.  Skip it.
      continue;
    }


    if (function_exists($module . "_perm")) {
      $rtn [$module][] = call_user_func($module . "_perm");
    }
  }

  return $rtn;
}