diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-12-19 18:04:04 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-12-19 18:04:04 +0100 |
commit | 2a3f94e4521f00142b99ba4fa5f4ec093159cbb7 (patch) | |
tree | 35dc0c015976fbba09d48b48c6dd1850be3bff53 /mod/item.php | |
parent | c3d12bc77ea3af6adc72f078d06bb9b199af6b45 (diff) | |
parent | 177af1fc9d286c4ecc7e5ce43e17f492b9e11817 (diff) | |
download | volse-hubzilla-2a3f94e4521f00142b99ba4fa5f4ec093159cbb7.tar.gz volse-hubzilla-2a3f94e4521f00142b99ba4fa5f4ec093159cbb7.tar.bz2 volse-hubzilla-2a3f94e4521f00142b99ba4fa5f4ec093159cbb7.zip |
Merge remote-tracking branch 'friendica/master'
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) { |