function block_access_get_roles in Block Access 6.2
Same name and namespace in other branches
- 6 block_access.db.inc \block_access_get_roles()
- 7 block_access.db.inc \block_access_get_roles()
2 calls to block_access_get_roles()
File
- ./
block_access.db.inc, line 43
Code
function block_access_get_roles($module, $perm, $delta = null) {
$ret = array();
$sql = "\n SELECT rid\n FROM {block_access_roles}\n WHERE module = '%s'\n AND permission = '%s'\n AND delta = '%s';\n ";
$result = db_query($sql, $module, $perm, $delta);
while ($rid = db_result($result)) {
$ret[] = $rid;
}
// If we didn't find any for the delta, use the module defaults
if (empty($ret)) {
$result = db_query($sql, $module, $perm, '');
while ($rid = db_result($result)) {
$ret[] = $rid;
}
}
return $ret;
}