summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-21 22:41:57 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-01-21 22:41:57 -0500
commit4e3891d24edc2bcbca710d73127521b3451b2cd5 (patch)
tree7724457b5d51a3b32fe1b0d22c431a440e01aca0 /lib/util.php
parent17fc0b7880ceb8106afbd3baf2c8111f04938f5d (diff)
Fix group fetch and regex for group link
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index 03a99e54c..61b73a556 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -424,7 +424,7 @@ function common_render_content($text, $notice)
$r = preg_replace('/(^|\s+)@([A-Za-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, '\\1').' '", $r);
$r = preg_replace('/(^|\s+)@#([A-Za-z0-9]{1,64})/e', "'\\1@#'.common_at_hash_link($id, '\\2')", $r);
- $r = preg_replace('/(^|\s)!([A-Za-z0-9]{1,64})/e', "\\1'!'.common_group_link($id, '\\2')", $r);
+ $r = preg_replace('/(^|\s)!([A-Za-z0-9]{1,64})/e', "'\\1!'.common_group_link($id, '\\2')", $r);
return $r;
}
@@ -599,7 +599,7 @@ function common_at_link($sender_id, $nickname)
function common_group_link($sender_id, $nickname)
{
$sender = Profile::staticGet($sender_id);
- $group = User_group::staticGet(common_canonical_nickname($nickname));
+ $group = User_group::staticGet('nickname', common_canonical_nickname($nickname));
if ($group && $sender->isMember($group)) {
return '<span class="vcard"><a href="'.htmlspecialchars($group->permalink()).'" class="url"><span class="fn nickname">'.$nickname.'</span></a></span>';
} else {