From f03aaf554e32fa528b0f1b1068db0824efb77e07 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 21 Feb 2012 16:59:57 -0800 Subject: mark all notifications read --- mod/notify.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mod/notify.php') diff --git a/mod/notify.php b/mod/notify.php index d1e5022bc..229020f4a 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -20,6 +20,16 @@ function notify_init(&$a) { goaway($a->get_baseurl()); } + + if($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) { + $r = q("update notify set seen = 1 where uid = %d", + intval(local_user()) + ); + $j = json_encode(array('result' => ($r) ? 'success' : 'fail')); + echo $j; + killme(); + } + } -- cgit v1.2.3