mark all notifications read

This commit is contained in:
friendica 2012-02-21 16:59:57 -08:00
parent 3e69b86bc1
commit f03aaf554e
3 changed files with 14 additions and 3 deletions

View file

@ -1551,7 +1551,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
} }
$force_parent = false; $force_parent = false;
if($contact['network'] === NETWORK_OSTATUS) { if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
if($contact['network'] === NETWORK_OSTATUS)
$force_parent = true; $force_parent = true;
if(strlen($datarray['title'])) if(strlen($datarray['title']))
unset($datarray['title']); unset($datarray['title']);

View file

@ -68,7 +68,7 @@ function group_content(&$a) {
return; return;
} }
// Switch to text mod interface if we have more than 'n' contacts or group members // Switch to text mode interface if we have more than 'n' contacts or group members
$switchtotext = get_pconfig(local_user(),'system','groupedit_image_limit'); $switchtotext = get_pconfig(local_user(),'system','groupedit_image_limit');
if($switchtotext === false) if($switchtotext === false)

View file

@ -20,6 +20,16 @@ function notify_init(&$a) {
goaway($a->get_baseurl()); 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();
}
} }