]> git.mxchange.org Git - friendica.git/commitdiff
add tag to personal
authorfriendica <info@friendica.com>
Wed, 30 Nov 2011 03:52:14 +0000 (19:52 -0800)
committerfriendica <info@friendica.com>
Wed, 30 Nov 2011 03:52:14 +0000 (19:52 -0800)
mod/message.php
mod/network.php

index 39aa0479ff17f99b8fa07f0aa9cfbb731be2769b..97868ab187f386728afc4202a473f3f10c5cf1f2 100644 (file)
@@ -89,16 +89,27 @@ function message_content(&$a) {
                        goaway($a->get_baseurl() . '/message' );
                }
                else {
-                       $r = q("SELECT `parent-uri` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+                       $r = q("SELECT `parent-uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                                intval($a->argv[2]),
                                intval(local_user())
                        );
                        if(count($r)) {
                                $parent = $r[0]['parent-uri'];
+                               $convid = $r[0]['convid'];
+
                                $r = q("DELETE FROM `mail` WHERE `parent-uri` = '%s' AND `uid` = %d ",
                                        dbesc($parent),
                                        intval(local_user())
                                );
+
+                               // remove diaspora conversation pointer
+
+                               if($convid) {
+                                       q("delete from conv where id = %d limit 1",
+                                               intval($convid)
+                                       );
+                               }
+
                                if($r)
                                        info( t('Conversation removed.') . EOL );
                        } 
index ace67dcfbb8b3c876c7c27dc8c0beaa0f295c4a9..8ba736fbec90133426d3663bafcfbe0bb8b75f2a 100644 (file)
@@ -374,7 +374,8 @@ function network_content(&$a, $update = 0) {
                $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
                $myurl = substr($myurl,strpos($myurl,'://')+3);
                $myurl = str_replace('www.','',$myurl);
-               $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where `author-link` regexp '%s') ",
+               $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' ) ",
+                       dbesc($myurl),
                        dbesc($myurl)
                );
        }