X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fuserdesignsettings.php;h=31a097970dc6bd5f63024c783c53156694a78311;hb=c899e4a84ee45b65950980ccb87e52129871d58e;hp=fc9c471cf2d5bcf225c9f7637fadc24e3189a0eb;hpb=d35b2d3f3c2128b147a6fa897032262c1f632262;p=quix0rs-gnu-social.git diff --git a/actions/userdesignsettings.php b/actions/userdesignsettings.php index fc9c471cf2..31a097970d 100644 --- a/actions/userdesignsettings.php +++ b/actions/userdesignsettings.php @@ -21,14 +21,14 @@ * * @category Settings * @package StatusNet - * @author Sarven Capadisli - * @author Zach Copley + * @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://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 - * @author Sarven Capadisli + * @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://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); } /**