You are here

function notifications_event_save in Notifications 6

Same name and namespace in other branches
  1. 5 notifications.module \notifications_event_save()

Stores new events

@TODO: Avoid to and from array conversion

Parameters

$event: Event object

1 call to notifications_event_save()
notifications_event in ./notifications.module
Process subscriptions events

File

./notifications.module, line 601
Notifications module

Code

function notifications_event_save(&$event) {
  $event = (array) $event;
  db_query("INSERT INTO {notifications_event} (module, type, action, uid, created, params) VALUES ('%s', '%s', '%s', %d, %d, '%s')", $event['module'], $event['type'], $event['action'], $event['uid'], $event['created'], serialize($event['params']));
  $event['eid'] = db_last_insert_id('notifications_event', 'eid');
  $event = (object) $event;
}