From d53b4b9b8411f8edbbeba57bdbc3b2e06c41c18e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 25 Feb 2010 12:05:22 -0500 Subject: [PATCH] save mainpage element for groups --- actions/editgroup.php | 1 + actions/newgroup.php | 3 +++ classes/User_group.php | 1 + 3 files changed, 5 insertions(+) diff --git a/actions/editgroup.php b/actions/editgroup.php index bbbb7a0f4a..d486db0c0a 100644 --- a/actions/editgroup.php +++ b/actions/editgroup.php @@ -249,6 +249,7 @@ class EditgroupAction extends GroupDesignAction $this->group->homepage = $homepage; $this->group->description = $description; $this->group->location = $location; + $this->group->mainpage = common_local_url('showgroup', array('nickname' => $nickname)); $result = $this->group->update($orig); diff --git a/actions/newgroup.php b/actions/newgroup.php index 6bb3eca765..75bc293ec6 100644 --- a/actions/newgroup.php +++ b/actions/newgroup.php @@ -180,6 +180,8 @@ class NewgroupAction extends Action } } + $mainpage = common_local_url('showgroup', array('nickname' => $nickname)); + $cur = common_current_user(); // Checked in prepare() above @@ -193,6 +195,7 @@ class NewgroupAction extends Action 'location' => $location, 'aliases' => $aliases, 'userid' => $cur->id, + 'mainpage' => $mainpage, 'local' => true)); common_redirect($group->homeUrl(), 303); diff --git a/classes/User_group.php b/classes/User_group.php index a81eb8ce06..0592c56f84 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -421,6 +421,7 @@ class User_group extends Memcached_DataObject $group->description = $description; $group->location = $location; $group->uri = $uri; + $group->mainpage = $mainpage; $group->created = common_sql_now(); $result = $group->insert(); -- 2.39.5