summaryrefslogtreecommitdiffstats
path: root/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'ajax')
-rw-r--r--ajax/usersettings.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/ajax/usersettings.php b/ajax/usersettings.php
index 27fc11cb1..c11bb346e 100644
--- a/ajax/usersettings.php
+++ b/ajax/usersettings.php
@@ -16,7 +16,13 @@ OCP\JSON::checkAppEnabled('news');
OCP\JSON::callCheck();
if(isset($_POST['showAll'])){
- OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'showAll', $_POST['showAll']);
+ if($_POST['showAll'] === 'false'){
+ $showAll = false;
+ } else {
+ $showAll = true;
+ }
+ OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'showAll', $showAll);
}
-OCP\JSON::success(); \ No newline at end of file
+OCP\JSON::success();
+