summaryrefslogtreecommitdiffstats
path: root/controller/pagecontroller.php
diff options
context:
space:
mode:
Diffstat (limited to 'controller/pagecontroller.php')
-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();
}