aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/text.php b/include/text.php
index 1825ec572..d7fc5808f 100644
--- a/include/text.php
+++ b/include/text.php
@@ -554,17 +554,16 @@ return str_replace ("%","=",rawurlencode($s));
if(! function_exists('get_mentions')) {
-function get_mentions($item) {
+function get_mentions($item,$tags) {
$o = '';
- if(! strlen($item['tag']))
+
+ if(! count($tags))
return $o;
- $arr = explode(',',$item['tag']);
- foreach($arr as $x) {
- $matches = null;
- if(preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) {
- $o .= "\t\t" . '<link rel="mentioned" href="' . $matches[1] . '" />' . "\r\n";
- $o .= "\t\t" . '<link rel="ostatus:attention" href="' . $matches[1] . '" />' . "\r\n";
+ foreach($tags as $x) {
+ if($x['type'] == TERM_MENTION) {
+ $o .= "\t\t" . '<link rel="mentioned" href="' . $x['url'] . '" />' . "\r\n";
+ $o .= "\t\t" . '<link rel="ostatus:attention" href="' . $x['url'] . '" />' . "\r\n";
}
}
return $o;