You are here

function fusion_apply_rule_delete in Fusion Accelerator 7

Same name and namespace in other branches
  1. 7.2 fusion_apply/fusion_apply_rules.module \fusion_apply_rule_delete()

Delete a skins rule object.

Parameters

$rid: The rule ID.

2 calls to fusion_apply_rule_delete()
fusion_apply_rule_delete_confirm_submit in fusion_apply/fusion_apply_ui.rules.inc
Process fusion_apply_rule_delete_confirm() submissions.
fusion_apply_rule_delete_confirm_submit in fusion_apply/fusion_apply_rules.inc
Process fusion_apply_rule_delete_confirm() submissions.

File

fusion_apply/fusion_apply_rules.module, line 135

Code

function fusion_apply_rule_delete($rid) {
  if ($rule = fusion_apply_rule_load($rid)) {
    db_delete('fusion_apply_rules')
      ->condition('rid', $rule->rid)
      ->execute();
    db_delete('fusion_apply_skins')
      ->condition('module', 'page')
      ->condition('element', $rule->rid)
      ->execute();
  }
}