X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Feditgroup.php;h=35dd25b896fbedecb7c1476b2acb457beeeffad7;hb=7d64d8c78cfa102b91975598ef9e574d2ef14b8c;hp=08a75da12c690658d2413ecd271c65b36ad1405e;hpb=4561caec1037a84d4b7dbd010e7b5a9b2464a0b7;p=quix0rs-gnu-social.git diff --git a/actions/editgroup.php b/actions/editgroup.php index 08a75da12c..35dd25b896 100644 --- a/actions/editgroup.php +++ b/actions/editgroup.php @@ -23,8 +23,8 @@ * @package StatusNet * @author Evan Prodromou * @author Sarven Capadisli - * @author Zach Copley - * @copyright 2008-2009 StatusNet, Inc. + * @author Zach Copley + * @copyright 2008-2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -45,7 +45,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -class EditgroupAction extends GroupDesignAction +class EditgroupAction extends GroupAction { var $msg; @@ -139,12 +139,6 @@ class EditgroupAction extends GroupDesignAction $this->showPage(); } - function showObjectNav() - { - $nav = new GroupNav($this, $this->group); - $nav->show(); - } - function showContent() { $form = new GroupEditForm($this, $this->group); @@ -185,6 +179,15 @@ class EditgroupAction extends GroupDesignAction $description = $this->trimmed('description'); $location = $this->trimmed('location'); $aliasstring = $this->trimmed('aliases'); + $private = $this->boolean('private'); + + if ($private) { + $force_scope = 1; + $join_policy = User_group::JOIN_POLICY_MODERATE; + } else { + $force_scope = 0; + $join_policy = User_group::JOIN_POLICY_OPEN; + } if ($this->nicknameExists($nickname)) { // TRANS: Group edit form validation error. @@ -265,6 +268,8 @@ class EditgroupAction extends GroupDesignAction $this->group->description = $description; $this->group->location = $location; $this->group->mainpage = common_local_url('showgroup', array('nickname' => $nickname)); + $this->group->join_policy = $join_policy; + $this->group->force_scope = $force_scope; $result = $this->group->update($orig);