]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
lcase tname
[quix0rs-gnu-social.git] / lib / util.php
index 322d89b9d282ff08502ffe7a098cb317c837b5cd..acc907480685ff1cc2dcd9f2f71a98f32669468a 100644 (file)
@@ -595,7 +595,7 @@ function common_render_content($text, $notice) {
        $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;
@@ -875,10 +875,7 @@ function common_save_replies($notice) {
                return true;
        }
        # XXX: is there another way to make an array copy?
-       $names = array_merge($match[1], array());
-       if ($tname) {
-               array_unshift($names, $tname);
-       }
+       $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)