You are here

function Notifications_Subscription::save in Notifications 7

Save to db

1 call to Notifications_Subscription::save()
Notifications_Subscription::form_operation in ./notifications.subscription.inc
Run form operation

File

./notifications.subscription.inc, line 1128
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

function save() {
  $update = $this
    ->is_stored();
  $this->updated = REQUEST_TIME;
  if (!$update) {
    $this->created = REQUEST_TIME;
  }
  $result = drupal_write_record('notifications_subscription', $this, $update ? 'sid' : array());
  $this
    ->save_fields($update);
  return $result;
}