From 10641b559849b1a6fd7fc78df8e177ed95effba5 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 24 Jul 2014 16:48:58 -0700 Subject: issues #542 #543 - mentions not linked on editing a post if they contained a forum indicator. --- mod/item.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index d4739244a..9d020adaa 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1076,6 +1076,13 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) { else $newname = str_replace('_',' ',$name); + // do this bit over since we started over with $name + + if(substr($newname,-1,1) === '+') { + $forum = true; + $newname = substr($newname,0,-1); + } + //select someone from this user's contacts by name $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE xchan_name = '%s' AND abook_channel = %d LIMIT 1", @@ -1161,6 +1168,8 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) { } } } + + return array('replaced' => $replaced, 'termtype' => $termtype, 'term' => $newname, 'url' => $url, 'contact' => $r[0]); } -- cgit v1.2.3