aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-28 18:18:20 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-28 18:18:20 -0700
commit051fb7107ef5c449d9d9627298b85abe882e8186 (patch)
tree51929f42dc2fa1d8925c5bc20e757af248d2237e /boot.php
parentf7e1e907bccbdba93122412f7bc5952b09a7815c (diff)
downloadvolse-hubzilla-051fb7107ef5c449d9d9627298b85abe882e8186.tar.gz
volse-hubzilla-051fb7107ef5c449d9d9627298b85abe882e8186.tar.bz2
volse-hubzilla-051fb7107ef5c449d9d9627298b85abe882e8186.zip
linkify @person and @person@domain.com tags
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 07810a50e..870a4c33b 100644
--- a/boot.php
+++ b/boot.php
@@ -1300,8 +1300,17 @@ function activity_match($haystack,$needle) {
if(! function_exists('get_tags')) {
function get_tags($s) {
- if(preg_match_all('/([@#][^ ,.:?\-]*)[ ,.:?\-]/',$s,$match))
- return $match[1];
+ $ret = array();
+ if(preg_match_all('/([@#][^ ,:?]*)[ ,:?]/',$s,$match)) {
+ foreach($match[1] as $match) {
+ if(substr($match,-1,1) === '.')
+ $ret[] = substr($match,0,-1);
+ else
+ $ret[] = $match;
+ }
+ }
+
+ return $ret;
}}