]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
save mainpage element for groups
authorEvan Prodromou <evan@status.net>
Thu, 25 Feb 2010 17:05:22 +0000 (12:05 -0500)
committerEvan Prodromou <evan@status.net>
Thu, 25 Feb 2010 17:05:22 +0000 (12:05 -0500)
actions/editgroup.php
actions/newgroup.php
classes/User_group.php

index bbbb7a0f4adc8434b26321f6c47b4fb9426d7b3f..d486db0c0aa3ba2bace92761e0443e6a30978046 100644 (file)
@@ -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);
 
index 6bb3eca7651ccaa7ca29fdf72e1c73ff4031f16f..75bc293ec63e15e4df92af789e115e8a997b2cc2 100644 (file)
@@ -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);
index a81eb8ce0608f10dae71b0f0873cee1565dc44f5..0592c56f8451476a1ddfe5929eb4a46eaf08185e 100644 (file)
@@ -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();