]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/groupdesignsettings.php
Delete design when user chooses to restore default design, instead
[quix0rs-gnu-social.git] / actions / groupdesignsettings.php
index bb01243c6e7e8eb599563153a0a06a765d7c078c..1c998efe1e215772beb8e96facbd4084341ab7ff 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Change user password
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Settings
- * @package   Laconica
- * @author    Sarven Capadisli <csarven@controlyourself.ca>
- * @author    Zach Copley <zach@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Sarven Capadisli <csarven@status.net>
+ * @author    Zach Copley <zach@status.net>
+ * @copyright 2008-2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://laconi.ca/
+ * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -40,11 +40,11 @@ require_once INSTALLDIR . '/lib/designsettings.php';
  * Saves a design for a given group
  *
  * @category Settings
- * @package  Laconica
- * @author   Zach Copley <zach@controlyourself.ca>
- * @author   Sarven Capadisli <csarven@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Zach Copley <zach@status.net>
+ * @author   Sarven Capadisli <csarven@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  */
 
 class GroupDesignSettingsAction extends DesignSettingsAction
@@ -64,11 +64,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
     {
         parent::prepare($args);
 
-        if (!common_config('inboxes', 'enabled')) {
-            $this->serverError(_('Inboxes must be enabled for groups to work'));
-            return false;
-        }
-
         if (!common_logged_in()) {
             $this->clientError(_('You must be logged in to edit a group.'));
             return false;
@@ -178,17 +173,12 @@ class GroupDesignSettingsAction extends DesignSettingsAction
 
     function getWorkingDesign()
     {
-
         $design = null;
 
         if (isset($this->group)) {
             $design = $this->group->getDesign();
         }
 
-        if (empty($design)) {
-            $design = $this->defaultDesign();
-        }
-
         return $design;
     }
 
@@ -202,7 +192,13 @@ class GroupDesignSettingsAction extends DesignSettingsAction
 
     function showContent()
     {
-        $this->showDesignForm($this->getWorkingDesign());
+        $design = $this->getWorkingDesign();
+
+        if (empty($design)) {
+            $design = Design::siteDesign();
+        }
+
+        $this->showDesignForm($design);
     }
 
     /**