]> git.mxchange.org Git - friendica.git/commitdiff
mark all notifications read
authorfriendica <info@friendica.com>
Wed, 22 Feb 2012 00:59:57 +0000 (16:59 -0800)
committerfriendica <info@friendica.com>
Wed, 22 Feb 2012 00:59:57 +0000 (16:59 -0800)
include/items.php
mod/group.php
mod/notify.php

index 3db56da5f6c2009e823698485338b3d69a91a1f1..347826042e66cc79a53a321567e6f4e778c028c1 100755 (executable)
@@ -1551,8 +1551,9 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                }
 
                                $force_parent = false;
-                               if($contact['network'] === NETWORK_OSTATUS) {
-                                       $force_parent = true;
+                               if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
+                                       if($contact['network'] === NETWORK_OSTATUS)
+                                               $force_parent = true;
                                        if(strlen($datarray['title']))
                                                unset($datarray['title']);
                                        $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
index ca163902ca685d127ca4163eaaf11123428980c6..c896362ca2f83241fa22d88b6e1b78b3463e48d5 100755 (executable)
@@ -68,7 +68,7 @@ function group_content(&$a) {
                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');
        if($switchtotext === false)
index d1e5022bcb59f386b06a9e6783444fec91837505..229020f4a715df876d44c1b44cc44734009e3bc3 100644 (file)
@@ -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();
+       }
+
 }