diff options
author | friendica <info@friendica.com> | 2011-12-22 15:42:01 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2011-12-22 15:42:01 -0800 |
commit | 95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa (patch) | |
tree | ced1f9a8bc579f85e0b74f76239de76ea95cedc0 /mod/item.php | |
parent | ed725df5f1c1ea2484c689283e93f8f825591384 (diff) | |
parent | b602203e6c9ae4b380fa615450e1a573f47cb756 (diff) | |
download | volse-hubzilla-95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa.tar.gz volse-hubzilla-95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa.tar.bz2 volse-hubzilla-95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa.zip |
Merge branch 'master' into notify
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php index 95a27eb8e..f72b17fc1 100644 --- a/mod/item.php +++ b/mod/item.php @@ -398,9 +398,13 @@ function item_post(&$a) { continue; $basetag = str_replace('_',' ',substr($tag,1)); $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body); - if(strlen($str_tags)) - $str_tags .= ','; - $str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]'; + + $newtag = '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]'; + if(! stristr($str_tags,$newtag)) { + if(strlen($str_tags)) + $str_tags .= ','; + $str_tags .= $newtag; + } continue; } if(strpos($tag,'@') === 0) { |