$id = $notice->profile_id;
$r = preg_replace('@https?://[^)\]>\s]+@', '<a href="\0" class="extlink">\0</a>', $r);
$r = preg_replace('/(^|\s+)@([a-z0-9]{1,64})/e', "'\\1@'.common_at_link($id, '\\2')", $r);
- $r = preg_replace('/^T ([A-Z0-9]{1,64}) /e', "'T '.common_at_link($id, strtolower('\\1')).' '", $r);
+ $r = preg_replace('/^T ([A-Z0-9]{1,64}) /e', "'T '.common_at_link($id, '\\1').' '", $r);
# XXX: # tags
# XXX: machine tags
return $r;
return true;
}
# XXX: is there another way to make an array copy?
- $names = array_merge($match[1], array());
- if ($tname) {
- array_unshift($tname, $names);
- }
+ $names = ($tname) ? array_unique(array_merge($match[1], array(strtolower($tname)))) : $match[1];
$sender = Profile::staticGet($notice->profile_id);
# store replied only for first @ (what user/notice what the reply directed,
# we assume first @ is it)