From 13a22c7224ecb6714565e1b9f790459b5e3c180d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20N=C3=BCsse?= Date: Mon, 27 Aug 2018 17:39:39 +0200 Subject: [PATCH 1/2] fix for favorites-quickaccess: newly added folders dont show up when added to favorites Signed-off-by: fnuesse --- apps/files/appinfo/routes.php | 5 +++++ apps/files/lib/Controller/ApiController.php | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index 1147bdf9c4fdd..b32469c8574b8 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -81,6 +81,11 @@ 'url' => '/api/v1/toggleShowFolder/{key}', 'verb' => 'POST' ], + [ + 'name' => 'API#getNodeType', + 'url' => '/api/v1/quickaccess/get/NodeType', + 'verb' => 'GET', + ], ] ] ); diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php index 9443b9776ae3d..27cd0b361c5f2 100644 --- a/apps/files/lib/Controller/ApiController.php +++ b/apps/files/lib/Controller/ApiController.php @@ -292,5 +292,17 @@ public function toggleShowFolder(int $show, string $key) { return $response; } + /** + * Get sorting-order for custom sorting + * + * @NoAdminRequired + * + * @param String + * @return String + */ + public function getNodeType($folderpath) { + $node = $this->userFolder->get($folderpath); + return $node->getType(); + } } From 94a5ffe394e290e0ad66a11750b6f301ccf37b4a Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 14 Nov 2018 21:18:16 +0100 Subject: [PATCH 2/2] Update PHPDoc to fix typos Signed-off-by: Morris Jobke --- apps/files/lib/Controller/ApiController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php index 27cd0b361c5f2..d518e0b0b869c 100644 --- a/apps/files/lib/Controller/ApiController.php +++ b/apps/files/lib/Controller/ApiController.php @@ -297,8 +297,9 @@ public function toggleShowFolder(int $show, string $key) { * * @NoAdminRequired * - * @param String - * @return String + * @param string + * @return string + * @throws \OCP\Files\NotFoundException */ public function getNodeType($folderpath) { $node = $this->userFolder->get($folderpath);