summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
Diffstat (limited to 'controller')
-rw-r--r--controller/foldercontroller.php24
1 files changed, 3 insertions, 21 deletions
diff --git a/controller/foldercontroller.php b/controller/foldercontroller.php
index 1137a2528..576fee422 100644
--- a/controller/foldercontroller.php
+++ b/controller/foldercontroller.php
@@ -57,33 +57,15 @@ class FolderController extends Controller {
}
- private function setOpened($isOpened, $folderId) {
- $this->folderService->open($folderId, $isOpened, $this->userId);
- }
-
-
- /**
- * @NoAdminRequired
- *
- * @param int $folderId
- */
- public function open($folderId) {
- try {
- $this->setOpened(true, $folderId);
- } catch(ServiceNotFoundException $ex) {
- return $this->error($ex, Http::STATUS_NOT_FOUND);
- }
- }
-
-
/**
* @NoAdminRequired
*
* @param int $folderId
+ * @param bool $open
*/
- public function collapse($folderId) {
+ public function open($folderId, $open) {
try {
- $this->setOpened(false, $folderId);
+ $this->folderService->open($folderId, $open, $this->userId);
} catch(ServiceNotFoundException $ex) {
return $this->error($ex, Http::STATUS_NOT_FOUND);
}