diff options
author | Evan Prodromou <evan@status.net> | 2010-02-25 12:15:26 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-02-25 12:15:26 -0500 |
commit | 2f03b2cc453d9ba60b6224b29ece398c8d6dfbda (patch) | |
tree | 5168c10fe9ff9dc4b135d4d3424da6856a93872b /classes | |
parent | 22255da735d1fc55466be51c3fae2a3d0b78e484 (diff) |
method for getting a group's URI
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User_group.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/classes/User_group.php b/classes/User_group.php index 0592c56f8..f24bef764 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -55,6 +55,21 @@ class User_group extends Memcached_DataObject return $url; } + function getUri() + { + $uri = null; + if (Event::handle('StartUserGroupGetUri', array($this, &$uri))) { + if (!empty($this->uri)) { + $uri = $this->uri; + } else { + $uri = common_local_url('groupbyid', + array('id' => $this->id)); + } + } + Event::handle('EndUserGroupGetUri', array($this, &$uri)); + return $uri; + } + function permalink() { $url = null; |