You are here

function config_perms_load in Custom Permissions 6.2

1 call to config_perms_load()
config_perms_cache_rebuild in ./config_perms.module
Configure permission names for urls:

File

./config_perms.module, line 143
Adds more granular permissions for items under 'administer site configuration'.

Code

function config_perms_load() {
  $perms = array();
  if (module_exists('ctools')) {
    ctools_include('export');
    $perms = ctools_export_load_object('config_perms');
  }
  else {
    $result = db_query("SELECT * FROM {config_perms}");
    while ($perm = db_fetch_object($result)) {
      $perm->path = unserialize($perm->path);
      $perms[$perm->machine_name] = $perm;
    }
  }
  return $perms;
}