4 function notify_init(&$a) {
8 if($a->argc > 2 && $a->argv[1] === 'view' && intval($a->argv[2])) {
9 $r = q("select * from notify where id = %d and uid = %d limit 1",
14 q("update notify set seen = 1 where id = %d and uid = %d limit 1",
18 goaway($r[0]['link']);
21 goaway($a->get_baseurl());
24 if($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) {
25 $r = q("update notify set seen = 1 where uid = %d",
28 $j = json_encode(array('result' => ($r) ? 'success' : 'fail'));
36 function notify_content(&$a) {