From e3bac437c225f28bc6a9ca34c4fc33c936b00513 Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Fri, 30 Jun 2023 11:19:21 +0200 Subject: chore: remove old favorites view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/files/lib/AppInfo/Application.php | 9 --------- apps/files/lib/Controller/ApiController.php | 14 -------------- apps/files/lib/Controller/ViewController.php | 29 ---------------------------- 3 files changed, 52 deletions(-) (limited to 'apps/files/lib') diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php index 0d366e66fe8..7021769752e 100644 --- a/apps/files/lib/AppInfo/Application.php +++ b/apps/files/lib/AppInfo/Application.php @@ -172,15 +172,6 @@ class Application extends App implements IBootstrap { 'name' => $l10n->t('Recent') ]; }); - \OCA\Files\App::getNavigationManager()->add(function () use ($l10n) { - return [ - 'id' => 'favorites', - 'appname' => 'files', - 'script' => 'simplelist.php', - 'order' => 5, - 'name' => $l10n->t('Favorites'), - ]; - }); } private function registerHooks(): void { diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php index fd0f3bdf261..f8911c4d104 100644 --- a/apps/files/lib/Controller/ApiController.php +++ b/apps/files/lib/Controller/ApiController.php @@ -383,20 +383,6 @@ class ApiController extends Controller { return new JSONResponse(['gridview' => $status]); } - /** - * Get sorting-order for custom sorting - * - * @NoAdminRequired - * - * @param string $folderpath - * @return string - * @throws \OCP\Files\NotFoundException - */ - public function getNodeType($folderpath) { - $node = $this->userFolder->get($folderpath); - return $node->getType(); - } - /** * @NoAdminRequired * @NoCSRFRequired diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 149ce242502..43be43aa116 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -202,37 +202,8 @@ class ViewController extends Controller { $favElements['folders'] = []; } - $collapseClasses = ''; - if (count($favElements['folders']) > 0) { - $collapseClasses = 'collapsible'; - } - - $favoritesSublistArray = []; - - $navBarPositionPosition = 6; - foreach ($favElements['folders'] as $favElement) { - $element = [ - 'id' => str_replace('/', '-', $favElement), - 'dir' => $favElement, - 'order' => $navBarPositionPosition, - 'name' => basename($favElement), - 'icon' => 'folder', - 'params' => [ - 'view' => 'files', - 'dir' => $favElement, - ], - ]; - - array_push($favoritesSublistArray, $element); - $navBarPositionPosition++; - } - $navItems = \OCA\Files\App::getNavigationManager()->getAll(); - // add the favorites entry in menu - $navItems['favorites']['sublist'] = $favoritesSublistArray; - $navItems['favorites']['classes'] = $collapseClasses; - // parse every menu and add the expanded user value foreach ($navItems as $key => $item) { $navItems[$key]['expanded'] = $this->config->getUserValue($userId, 'files', 'show_' . $item['id'], '0') === '1'; -- cgit v1.2.3