]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
method for getting a group's URI
authorEvan Prodromou <evan@status.net>
Thu, 25 Feb 2010 17:15:26 +0000 (12:15 -0500)
committerEvan Prodromou <evan@status.net>
Thu, 25 Feb 2010 17:15:26 +0000 (12:15 -0500)
classes/User_group.php

index 0592c56f8451476a1ddfe5929eb4a46eaf08185e..f24bef7647ec2b3bd62c1f047f2eec3ddaa6b5a7 100644 (file)
@@ -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;