summaryrefslogtreecommitdiffstats
path: root/ajax
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-09-03 01:15:39 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-09-03 01:16:28 +0200
commit379554e1b06dfc35127d9aadf8d8c1417c5ab14d (patch)
tree212a43716a011374ef50e956938f368f8c388358 /ajax
parentff09dc5c27a0c6af2c6946d293da0522a336bb6c (diff)
fixed weird showAll post request
Diffstat (limited to 'ajax')
-rw-r--r--ajax/usersettings.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/ajax/usersettings.php b/ajax/usersettings.php
index 9ddd69f6e..27fc11cb1 100644
--- a/ajax/usersettings.php
+++ b/ajax/usersettings.php
@@ -15,16 +15,8 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('news');
OCP\JSON::callCheck();
-switch($_POST['show']){
- case 'all':
- $showAll = true;
- break;
- default:
- $showAll = false;
- break;
+if(isset($_POST['showAll'])){
+ OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'showAll', $_POST['showAll']);
}
-// TODO: receive and save user settings
-OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'showAll', $showAll);
-
OCP\JSON::success(); \ No newline at end of file