]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/userdesignsettings.php
strip out session ID from root URL
[quix0rs-gnu-social.git] / actions / userdesignsettings.php
index fc9c471cf2d5bcf225c9f7637fadc24e3189a0eb..31a097970dc6bd5f63024c783c53156694a78311 100644 (file)
  *
  * @category  Settings
  * @package   StatusNet
- * @author    Sarven Capadisli <csarven@controlyourself.ca>
- * @author    Zach Copley <zach@controlyourself.ca>
+ * @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://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -41,8 +41,8 @@ require_once INSTALLDIR . '/lib/designsettings.php';
  *
  * @category Settings
  * @package  StatusNet
- * @author   Zach Copley <zach@controlyourself.ca>
- * @author   Sarven Capadisli <csarven@controlyourself.ca>
+ * @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://status.net/
  */
@@ -96,14 +96,8 @@ class UserDesignSettingsAction extends DesignSettingsAction
 
     function getWorkingDesign()
     {
-
         $user   = common_current_user();
         $design = $user->getDesign();
-
-        if (empty($design)) {
-            $design = $this->defaultDesign();
-        }
-
         return $design;
     }
 
@@ -117,7 +111,13 @@ class UserDesignSettingsAction extends DesignSettingsAction
 
     function showContent()
     {
-        $this->showDesignForm($this->getWorkingDesign());
+        $design = $this->getWorkingDesign();
+
+        if (empty($design)) {
+            $design = Design::siteDesign();
+        }
+
+        $this->showDesignForm($design);
     }
 
     /**