aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/App
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/App')
-rw-r--r--core/Command/App/Disable.php1
-rw-r--r--core/Command/App/ListApps.php13
-rw-r--r--core/Command/App/Update.php3
3 files changed, 10 insertions, 7 deletions
diff --git a/core/Command/App/Disable.php b/core/Command/App/Disable.php
index a0a20ef21dd..121ad3f010c 100644
--- a/core/Command/App/Disable.php
+++ b/core/Command/App/Disable.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
diff --git a/core/Command/App/ListApps.php b/core/Command/App/ListApps.php
index 5244d66e0d8..dc947bea55f 100644
--- a/core/Command/App/ListApps.php
+++ b/core/Command/App/ListApps.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
@@ -14,7 +15,7 @@ use Symfony\Component\Console\Output\OutputInterface;
class ListApps extends Base {
public function __construct(
- protected IAppManager $manager,
+ protected IAppManager $appManager,
) {
parent::__construct();
}
@@ -56,16 +57,16 @@ class ListApps extends Base {
$showEnabledApps = $input->getOption('enabled') || !$input->getOption('disabled');
$showDisabledApps = $input->getOption('disabled') || !$input->getOption('enabled');
- $apps = \OC_App::getAllApps();
+ $apps = $this->appManager->getAllAppsInAppsFolders();
$enabledApps = $disabledApps = [];
- $versions = \OC_App::getAppVersions();
+ $versions = $this->appManager->getAppInstalledVersions();
//sort enabled apps above disabled apps
foreach ($apps as $app) {
- if ($shippedFilter !== null && $this->manager->isShipped($app) !== $shippedFilter) {
+ if ($shippedFilter !== null && $this->appManager->isShipped($app) !== $shippedFilter) {
continue;
}
- if ($this->manager->isEnabledForAnyone($app)) {
+ if ($this->appManager->isEnabledForAnyone($app)) {
$enabledApps[] = $app;
} else {
$disabledApps[] = $app;
@@ -88,7 +89,7 @@ class ListApps extends Base {
sort($disabledApps);
foreach ($disabledApps as $app) {
- $apps['disabled'][$app] = $this->manager->getAppVersion($app) . (isset($versions[$app]) ? ' (installed ' . $versions[$app] . ')' : '');
+ $apps['disabled'][$app] = $this->appManager->getAppVersion($app) . (isset($versions[$app]) ? ' (installed ' . $versions[$app] . ')' : '');
}
}
diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php
index b2d02e222de..71c7f84e5b0 100644
--- a/core/Command/App/Update.php
+++ b/core/Command/App/Update.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace OC\Core\Command\App;
use OC\Installer;
+use OCP\App\AppPathNotFoundException;
use OCP\App\IAppManager;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\Command;
@@ -64,7 +65,7 @@ class Update extends Command {
$apps = [$singleAppId];
try {
$this->manager->getAppPath($singleAppId);
- } catch (\OCP\App\AppPathNotFoundException $e) {
+ } catch (AppPathNotFoundException $e) {
$output->writeln($singleAppId . ' not installed');
return 1;
}