You are here

function _ed_classified_periodic_notification_time in Classified Ads 6.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. 7.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.

File

./ed_classified_notifications.inc, line 122
user notifications for imple text-based classified ads module

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;
}