function notifications_event_save in Notifications 5
Same name and namespace in other branches
- 6 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 378 - Notifications module
Code
function notifications_event_save(&$event) {
$event = (array) $event;
$event['eid'] = db_next_id('{notifications_event}_eid');
db_query("INSERT INTO {notifications_event} (eid, module, type, action, uid, created, params) VALUES (%d, '%s', '%s', '%s', %d, %d, '%s')", $event['eid'], $event['module'], $event['type'], $event['action'], $event['uid'], $event['created'], serialize($event['params']));
$event = (object) $event;
}