From 9b1c09fe83bd0201c326059e6fe9e3823ae11f5b Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 8 Feb 2015 13:52:46 -0800 Subject: restrict "mark all events seen" to only the events that are presented in the notification view. --- mod/ping.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod') 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': -- cgit v1.2.3