aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-16 21:52:26 -0700
committerfriendica <info@friendica.com>2012-07-16 21:52:26 -0700
commit54ffc32d7c4d9c9d1231bdfa2147b7dc6ef12743 (patch)
tree4cb5736d404790ef19e5bdb940de4328d227732c /include/text.php
parentd3279a615726efb0147a14140a16d6b62f650f77 (diff)
downloadvolse-hubzilla-54ffc32d7c4d9c9d1231bdfa2147b7dc6ef12743.tar.gz
volse-hubzilla-54ffc32d7c4d9c9d1231bdfa2147b7dc6ef12743.tar.bz2
volse-hubzilla-54ffc32d7c4d9c9d1231bdfa2147b7dc6ef12743.zip
working towards getting rid of item['tag'] and item['file'] - still some dependencies
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;