summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-25 23:23:56 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-25 23:24:47 +0100
commit866f5eef01f95c692061acac7a6946db3949e61b (patch)
tree2ad83bab23b4d0201ea7373683c11eeb08ffb90d /controller
parent18680c8c448bc296b649c7eaa745468c301bff0f (diff)
fix bad setter usage
Diffstat (limited to 'controller')
-rw-r--r--controller/usersettingscontroller.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php
index 157dee7ff..db87276f8 100644
--- a/controller/usersettingscontroller.php
+++ b/controller/usersettingscontroller.php
@@ -45,10 +45,9 @@ class UserSettingsController extends Controller {
*/
public function read(){
$userId = $this->api->getUserId();
- $showAll = $this->api->getUserValue($userId, 'showAll');
-
+ $showAll = $this->api->getUserValue('showAll');
$params = array(
- 'showAll' => $showAll === 'true'
+ 'showAll' => $showAll === '1'
);
return $this->renderJSON($params);
@@ -62,7 +61,7 @@ class UserSettingsController extends Controller {
*/
public function show(){
$userId = $this->api->getUserId();
- $this->api->setUserValue($userId, 'showAll', true);
+ $this->api->setUserValue('showAll', true);
return $this->renderJSON();
}
@@ -75,7 +74,7 @@ class UserSettingsController extends Controller {
*/
public function hide(){
$userId = $this->api->getUserId();
- $this->api->setUserValue($userId, 'showAll', false);
+ $this->api->setUserValue('showAll', false);
return $this->renderJSON();
}