You are here

function _ed_classified_periodic_notification_time in Classified Ads 7.2

Same name and namespace in other branches
  1. 5.2 ed_classified_notifications.inc \_ed_classified_periodic_notification_time()
  2. 5 ed_classified_notifications.inc \_ed_classified_periodic_notification_time()
  3. 6.2 ed_classified_notifications.inc \_ed_classified_periodic_notification_time()

Return TRUE if we need to send periodic notifications according to time and configuration options Only send notifications if sufficient time has passed since last notification run completed.

1 call to _ed_classified_periodic_notification_time()
_ed_classified_notify_advertisers_periodic in ./ed_classified_notifications.inc
Process "periodic" notifications Create a notification if a user has ads nearing expiration

File

./ed_classified_notifications.inc, line 113
user notifications for imple text-based classified ads module Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights Reserved.…

Code

function _ed_classified_periodic_notification_time($time) {
  $last_notify_time = _ed_classified_variable_get('email_reminders_last_sent', 0);

  // only update notifications if haven't been notified in over 24 hours
  $next_notify_time = $last_notify_time + _ed_classified_variable_get('email_reminder_period_secs', 86400);
  return $time > $next_notify_time;
}