From: Evan Prodromou Date: Thu, 25 Feb 2010 17:15:26 +0000 (-0500) Subject: method for getting a group's URI X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2f03b2cc453d9ba60b6224b29ece398c8d6dfbda;p=quix0rs-gnu-social.git method for getting a group's URI --- diff --git a/classes/User_group.php b/classes/User_group.php index 0592c56f84..f24bef7647 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;