summaryrefslogtreecommitdiff
path: root/classes/User_group.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-25 09:24:29 -0500
committerEvan Prodromou <evan@status.net>2010-02-25 09:24:29 -0500
commit8f42d375939116eff482b3d07a8feaa4cc29c984 (patch)
tree9f17fffb14544388eae9defd0dab91da87fe671c /classes/User_group.php
parente6858d7203bd36923f6251968bede6f4b271bf84 (diff)
Add 'mainpage' to User_group
Add the mainpage attribute to user_group objects.
Diffstat (limited to 'classes/User_group.php')
-rw-r--r--classes/User_group.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/classes/User_group.php b/classes/User_group.php
index 5877ce202..a81eb8ce0 100644
--- a/classes/User_group.php
+++ b/classes/User_group.php
@@ -23,6 +23,7 @@ class User_group extends Memcached_DataObject
public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
public $uri; // varchar(255) unique_key
+ public $mainpage; // varchar(255)
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('User_group',$k,$v); }
@@ -42,8 +43,13 @@ class User_group extends Memcached_DataObject
{
$url = null;
if (Event::handle('StartUserGroupHomeUrl', array($this, &$url))) {
- $url = common_local_url('showgroup',
- array('nickname' => $this->nickname));
+ // normally stored in mainpage, but older ones may be null
+ if (!empty($this->mainpage)) {
+ $url = $this->mainpage;
+ } else {
+ $url = common_local_url('showgroup',
+ array('nickname' => $this->nickname));
+ }
}
Event::handle('EndUserGroupHomeUrl', array($this, &$url));
return $url;