]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User_group.php
Not only local groups should be added to group inbox notificiation table
[quix0rs-gnu-social.git] / classes / User_group.php
index 7bfb16e27f67df7e04d2a91c43a2a820fe3c00e3..2484f3f265252d8c375684b983cd5bac22bb1175 100644 (file)
@@ -14,6 +14,7 @@ class User_group extends Managed_DataObject
 
     public $__table = 'user_group';                      // table name
     public $id;                              // int(4)  primary_key not_null
+    public $profile_id;                      // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)
     public $fullname;                        // varchar(191)   not 255 because utf8mb4 takes more space
     public $homepage;                        // varchar(191)   not 255 because utf8mb4 takes more space
@@ -114,18 +115,7 @@ class User_group extends Managed_DataObject
 
     function homeUrl()
     {
-        $url = null;
-        if (Event::handle('StartUserGroupHomeUrl', array($this, &$url))) {
-            // normally stored in mainpage, but older ones may be null
-            if (!empty($this->mainpage)) {
-                $url = $this->mainpage;
-            } elseif ($this->isLocal()) {
-                $url = common_local_url('showgroup',
-                                        array('nickname' => $this->nickname));
-            }
-        }
-        Event::handle('EndUserGroupHomeUrl', array($this, &$url));
-        return $url;
+        return $this->getProfile()->getUrl();
     }
 
     function getUri()