4 function starred_init(&$a) {
11 $message_id = intval($a->argv[1]);
15 $r = q("SELECT starred FROM item WHERE uid = %d AND id = %d LIMIT 1",
22 if(! intval($r[0]['starred']))
25 $r = q("UPDATE item SET starred = %d WHERE uid = %d and id = %d LIMIT 1",
31 // the json doesn't really matter, it will either be 0 or 1
33 echo json_encode($starred);