Fix missing mentions
This commit is contained in:
parent
fcfd04bcc9
commit
3020b0fdc4
1 changed files with 12 additions and 4 deletions
|
@ -110,6 +110,18 @@ class Term
|
||||||
$pattern = '/\W([\#@])\[url\=(.*?)\](.*?)\[\/url\]/ism';
|
$pattern = '/\W([\#@])\[url\=(.*?)\](.*?)\[\/url\]/ism';
|
||||||
if (preg_match_all($pattern, $data, $matches, PREG_SET_ORDER)) {
|
if (preg_match_all($pattern, $data, $matches, PREG_SET_ORDER)) {
|
||||||
foreach ($matches as $match) {
|
foreach ($matches as $match) {
|
||||||
|
|
||||||
|
if ($match[1] == '@') {
|
||||||
|
$contact = Contact::getDetailsByURL($match[2], 0);
|
||||||
|
if (!empty($contact['addr'])) {
|
||||||
|
$match[3] = $contact['addr'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($contact['url'])) {
|
||||||
|
$match[2] = $contact['url'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$tags[$match[1] . trim($match[3], ',.:;[]/\"?!')] = $match[2];
|
$tags[$match[1] . trim($match[3], ',.:;[]/\"?!')] = $match[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,10 +149,6 @@ class Term
|
||||||
} else {
|
} else {
|
||||||
$term = substr($tag, 1);
|
$term = substr($tag, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($contact['url'])) {
|
|
||||||
$link = $contact['url'];
|
|
||||||
}
|
|
||||||
} else { // This shouldn't happen
|
} else { // This shouldn't happen
|
||||||
$type = TERM_HASHTAG;
|
$type = TERM_HASHTAG;
|
||||||
$term = $tag;
|
$term = $tag;
|
||||||
|
|
Loading…
Reference in a new issue