X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fuserdesignsettings.php;h=31a097970dc6bd5f63024c783c53156694a78311;hb=c899e4a84ee45b65950980ccb87e52129871d58e;hp=d7949951abaae210dcd2a3a925d5b6aa5d975e05;hpb=d846c5fc9927b93e59192e19fd59a8d350b0e3c9;p=quix0rs-gnu-social.git diff --git a/actions/userdesignsettings.php b/actions/userdesignsettings.php index d7949951ab..31a097970d 100644 --- a/actions/userdesignsettings.php +++ b/actions/userdesignsettings.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Sarven Capadisli - * @author Zach Copley - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Sarven Capadisli + * @author Zach Copley + * @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 user * * @category Settings - * @package Laconica - * @author Zach Copley - * @author Sarven Capadisli + * @package StatusNet + * @author Zach Copley + * @author Sarven Capadisli * @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 UserDesignSettingsAction extends DesignSettingsAction @@ -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); } /**