You are here

function block_access_get_module in Block Access 6

Same name and namespace in other branches
  1. 6.2 block_access.db.inc \block_access_get_module()
  2. 7 block_access.db.inc \block_access_get_module()
1 call to block_access_get_module()
theme_block_access_admin_list in ./block_access.theme.inc
Theme function for the admin list form.

File

./block_access.db.inc, line 74

Code

function block_access_get_module($module) {
  $sql = "\n    SELECT rid, permission\n    FROM {block_access_roles}\n    WHERE module = '%s'\n    AND   delta = ''";
  $result = db_query($sql, $module);
  $ret = array();
  while ($ob = db_fetch_object($result)) {
    if (isset($ret[$ob->rid])) {
      $ret[$ob->rid][] = $ob->permission;
    }
    else {
      $ret[$ob->rid] = array(
        $ob->permission,
      );
    }
  }
  return $ret;
}