aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notify.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-21 16:59:57 -0800
committerfriendica <info@friendica.com>2012-02-21 16:59:57 -0800
commitf03aaf554e32fa528b0f1b1068db0824efb77e07 (patch)
treeb7159cddd4995482c67bc0290408552abb4cb046 /mod/notify.php
parent3e69b86bc1754087f8093b11b27aee2f56f5d79a (diff)
downloadvolse-hubzilla-f03aaf554e32fa528b0f1b1068db0824efb77e07.tar.gz
volse-hubzilla-f03aaf554e32fa528b0f1b1068db0824efb77e07.tar.bz2
volse-hubzilla-f03aaf554e32fa528b0f1b1068db0824efb77e07.zip
mark all notifications read
Diffstat (limited to 'mod/notify.php')
-rw-r--r--mod/notify.php10
1 files changed, 10 insertions, 0 deletions
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();
+ }
+
}