diff options
Diffstat (limited to 'ajax')
-rw-r--r-- | ajax/usersettings.php | 12 |
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 |