X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fuserdesignsettings.php;h=1cf87800069f531440800d7661bd362279e6bdeb;hb=3194a86caa02f5796f468a7d2ebc8e54139fb1cb;hp=d7949951abaae210dcd2a3a925d5b6aa5d975e05;hpb=bafa1ab1c532118e2230df50ed18a1b4573692b7;p=quix0rs-gnu-social.git diff --git a/actions/userdesignsettings.php b/actions/userdesignsettings.php index d7949951ab..1cf8780006 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); } /** @@ -207,7 +207,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($id)) { common_log_db_error($id, 'INSERT', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); return; } @@ -217,7 +217,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($result)) { common_log_db_error($original, 'UPDATE', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); $user->query('ROLLBACK'); return; } @@ -260,7 +260,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($id)) { common_log_db_error($id, 'INSERT', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); return; } @@ -270,7 +270,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($result)) { common_log_db_error($original, 'UPDATE', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); $user->query('ROLLBACK'); return; }