summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-01-31 15:52:33 +0400
committerAndrew Dolgov <[email protected]>2012-01-31 15:52:33 +0400
commit1b9b19af0fe6e98f71993c177cba4a7e9e268e8b (patch)
tree74e2becfe7f2285146bbb1f6ff820be14eb5b7b6 /include
parent76c843a9ba0f34a48674718dd831bb69f94c9c54 (diff)
try to send digests within 2 hours of preferred time only
Diffstat (limited to 'include')
-rw-r--r--include/functions.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 9eb66de3e..0ef1d013f 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -2706,7 +2706,9 @@
if (get_pref($link, 'DIGEST_ENABLE', $line['id'], false)) {
$preferred_ts = strtotime(get_pref($link, 'DIGEST_PREFERRED_TIME', $line['id'], '00:00'));
- if ($preferred_ts && time() >= $preferred_ts) {
+ // try to send digests within 2 hours of preferred time
+ if ($preferred_ts && time() >= $preferred_ts &&
+ time() - $preferred_ts <= 7200) {
if ($debug) print "Sending digest for UID:" . $line['id'] . " - " . $line["email"] . " ... ";