eliminate dup identical hashtags in posts
This commit is contained in:
parent
193435e980
commit
efb9157490
1 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
|
||||
$newtag = '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
if(! stristr($str_tags,$newtag)) {
|
||||
if(strlen($str_tags))
|
||||
$str_tags .= ',';
|
||||
$str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
$str_tags .= $newtag;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if(strpos($tag,'@') === 0) {
|
||||
|
|
Loading…
Reference in a new issue