You are here

function block_access_delete_roles in Block Access 6

Same name and namespace in other branches
  1. 6.2 block_access.db.inc \block_access_delete_roles()
  2. 7 block_access.db.inc \block_access_delete_roles()
1 call to block_access_delete_roles()
block_access_config_set_roles in ./block_access.module

File

./block_access.db.inc, line 7

Code

function block_access_delete_roles($module, $perm, $delta = null) {
  $sql = "\n    DELETE FROM {block_access_roles} \n    WHERE module = '%s'\n    AND   permission = '%s'\n  ";
  $args = array(
    $module,
    $perm,
  );
  if ($delta !== null) {
    $sql .= "AND delta = '%s'";
    $args[] = $delta;
  }
  else {
    $sql .= "AND delta IS NULL";
  }
  db_query($sql, $args);
}