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); }
{
$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;
modified timestamp comment 'date this record was modified',
uri varchar(255) unique key comment 'universal identifier',
+ mainpage varchar(255) comment 'page for group info to link to',
index user_group_nickname_idx (nickname)