aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-08 13:52:46 -0800
committerfriendica <info@friendica.com>2015-02-08 13:52:46 -0800
commit9b1c09fe83bd0201c326059e6fe9e3823ae11f5b (patch)
tree4377680545cdc644423689590c7095004fa6887d /mod
parent89739c0ff736beea02483146f30c85b007ea4cfa (diff)
downloadvolse-hubzilla-9b1c09fe83bd0201c326059e6fe9e3823ae11f5b.tar.gz
volse-hubzilla-9b1c09fe83bd0201c326059e6fe9e3823ae11f5b.tar.bz2
volse-hubzilla-9b1c09fe83bd0201c326059e6fe9e3823ae11f5b.zip
restrict "mark all events seen" to only the events that are presented in the notification view.
Diffstat (limited to 'mod')
-rw-r--r--mod/ping.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/ping.php b/mod/ping.php
index c69f42a6f..6a89ad5cf 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -173,8 +173,10 @@ function ping_init(&$a) {
);
break;
case 'all_events':
- $r = q("update event set `ignore` = 1 where `ignore` = 0 and uid = %d",
- intval(local_channel())
+ $r = q("update event set `ignore` = 1 where `ignore` = 0 and uid = %d AND start < '%s' AND start > '%s' ",
+ intval(local_channel()),
+ dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
+ dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
);
break;
case 'notify':