You are here

function notifications_custom_delete in Notifications 6

Same name and namespace in other branches
  1. 6.4 notifications_custom/notifications_custom.module \notifications_custom_delete()

Delete custom subscription and optionally all instances of it

Parameters

$type: Custom subscription type to delete

$instances: Delete also subscription instances

2 calls to notifications_custom_delete()
notifications_custom_delete_confirm_submit in notifications_custom/notifications_custom.admin.inc
Process subscription type delete confirm submissions.
notifications_custom_form_submit in notifications_custom/notifications_custom.admin.inc
Form submission for custom subscriptions form

File

notifications_custom/notifications_custom.module, line 284
Custom notifications module

Code

function notifications_custom_delete($type, $instances = FALSE) {
  if ($instances) {
    notifications_delete_subscriptions(array(
      'type' => $type,
    ));
  }
  db_query("DELETE FROM {notifications_custom} WHERE type = '%s'", $type);
}