You are here

protected function Notifications_Scheduler_New_Posts::get_last_time in Notifications 7

Get last time (timestamp) when this event/action was executed

Return value

int (timestamp)

File

notifications_scheduler/notifications_scheduler.inc, line 294
Drupal Notifications Framework - Default class file

Class

Notifications_Scheduler_New_Posts
Send new content posted since last notification.

Code

protected function get_last_time() {
  $last = (int) db_query('SELECT MAX(created) FROM {notifications_event} WHERE type = :type AND action = :action', array(
    ':type' => $this->type,
    ':action' => $this->action,
  ))
    ->fetchField();
  return $last ? $last : variable_get('notifications_scheduler_last', 0);
}