You are here

function block_access_delete_roles in Block Access 7

Same name and namespace in other branches
  1. 6.2 block_access.db.inc \block_access_delete_roles()
  2. 6 block_access.db.inc \block_access_delete_roles()

delete a block_access permission for a module or specific block for all roles

Parameters

$module - the name of the module:

$module - the permission being removed:

$delta - optional block delta:

2 calls to block_access_delete_roles()
block_access_config_set_roles in ./block_access.module
block_access_features_revert in ./block_access.module
Implements hook_features_revert().

File

./block_access.db.inc, line 14

Code

function block_access_delete_roles($module, $perm, $delta = NULL) {
  $delete = db_delete('block_access_roles')
    ->condition('module', $module, '=')
    ->condition('permission', $perm, '=');
  if ($delta) {
    $delete
      ->condition('delta', $delta, '=');
  }
  else {
    $delete
      ->condition('delta', '', '=');
  }
  return $delete
    ->execute();
}