From d9d5e975d8f4671341f9c3b5ead85578a86b1c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 17 May 2018 22:42:16 +0200 Subject: [PATCH] Remove default categories from route endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/Controller/AppSettingsController.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php index 15b688736f..413e54d6ce 100644 --- a/settings/Controller/AppSettingsController.php +++ b/settings/Controller/AppSettingsController.php @@ -143,6 +143,7 @@ class AppSettingsController extends Controller { $params['category'] = $category; $params['appstoreEnabled'] = $this->config->getSystemValue('appstoreenabled', true) === true; $params['urlGenerator'] = $this->urlGenerator; + $params['updateCount'] = count($this->getAppsWithUpdates()); $this->navigationManager->setActiveEntry('core_apps'); $templateResponse = new TemplateResponse($this->appName, 'apps', $params, 'user'); @@ -158,14 +159,7 @@ class AppSettingsController extends Controller { private function getAllCategories() { $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); - $updateCount = count($this->getAppsWithUpdates()); - $formattedCategories = [ - ['id' => self::CAT_ALL_INSTALLED, 'ident' => 'installed', 'displayName' => (string)$this->l10n->t('Your apps')], - ['id' => self::CAT_UPDATES, 'ident' => 'updates', 'displayName' => (string)$this->l10n->t('Updates'), 'counter' => $updateCount], - ['id' => self::CAT_ENABLED, 'ident' => 'enabled', 'displayName' => (string)$this->l10n->t('Enabled apps')], - ['id' => self::CAT_DISABLED, 'ident' => 'disabled', 'displayName' => (string)$this->l10n->t('Disabled apps')], - ['id' => self::CAT_APP_BUNDLES, 'ident' => 'app-bundles', 'displayName' => (string)$this->l10n->t('App bundles')], - ]; + $formattedCategories = []; $categories = $this->categoryFetcher->get(); foreach($categories as $category) { $formattedCategories[] = [