X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fuserdesignsettings.php;h=1cf87800069f531440800d7661bd362279e6bdeb;hb=a21a17263956808e074fb62551300c5d6297387b;hp=568c1d62424ea047bb601f66f479ef7718899251;hpb=b3b3af9a2eff10c272bb213eccd3dd3060bc5830;p=quix0rs-gnu-social.git diff --git a/actions/userdesignsettings.php b/actions/userdesignsettings.php index 568c1d6242..1cf8780006 100644 --- a/actions/userdesignsettings.php +++ b/actions/userdesignsettings.php @@ -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; }