summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 16:55:06 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 22:52:27 +0200
commit339b42712104944cb1e096f9f862bedcca70a4b7 (patch)
tree998e078dabaf34b1e4e79ae72f09210fd5b0edd8 /controller
parent8588c4602811f698dec26a607bd14ea980c5ce72 (diff)
only set passed settings
Diffstat (limited to 'controller')
-rw-r--r--controller/pagecontroller.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php
index 4acc5f9e6..137dcf514 100644
--- a/controller/pagecontroller.php
+++ b/controller/pagecontroller.php
@@ -72,10 +72,16 @@ class PageController extends Controller {
* @NoAdminRequired
*/
public function updateSettings() {
- $isShowAll = $this->params('showAll');
- $isCompact = $this->params('compact');
- $this->api->setUserValue('showAll', $isShowAll);
- $this->api->setUserValue('compact', $isCompact);
+ $isShowAll = $this->params('showAll', null);
+ $isCompact = $this->params('compact', null);
+
+ if($isShowAll !== null) {
+ $this->api->setUserValue('showAll', $isShowAll);
+ }
+
+ if($isCompact !== null) {
+ $this->api->setUserValue('compact', $isCompact);
+ }
return new JSONResponse();
}