diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-09-13 17:44:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-13 17:44:38 +0200 |
commit | bcb4e781a407798ef9d071dc3a15a1d0ac9e0e8d (patch) | |
tree | e210686e9c6d7fdd33b7e0cc905fbd38143db0a3 /apps/settings | |
parent | 032f17c7956748fd25e33edf5d85d1d25b1ee94b (diff) | |
parent | 7a16d01ea79bf8effedd5e0e9ac7c2e4b4ea41f8 (diff) | |
download | nextcloud-server-bcb4e781a407798ef9d071dc3a15a1d0ac9e0e8d.tar.gz nextcloud-server-bcb4e781a407798ef9d071dc3a15a1d0ac9e0e8d.zip |
Merge pull request #47927 from nextcloud/fix/migrate-away-from-oc_app
Migrate away from OC_App to IAppManager
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/Controller/AppSettingsController.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index 760584888c0..2c682ac4600 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -14,7 +14,6 @@ use OC\App\AppStore\Version\VersionParser; use OC\App\DependencyAnalyzer; use OC\App\Platform; use OC\Installer; -use OC_App; use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; use OCP\AppFramework\Controller; @@ -479,7 +478,7 @@ class AppSettingsController extends Controller { $updateRequired = false; foreach ($appIds as $appId) { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); // Check if app is already downloaded /** @var Installer $installer */ @@ -537,7 +536,7 @@ class AppSettingsController extends Controller { public function disableApps(array $appIds): JSONResponse { try { foreach ($appIds as $appId) { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $this->appManager->disableApp($appId); } return new JSONResponse([]); @@ -553,7 +552,7 @@ class AppSettingsController extends Controller { */ #[PasswordConfirmationRequired] public function uninstallApp(string $appId): JSONResponse { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $result = $this->installer->removeApp($appId); if ($result !== false) { $this->appManager->clearAppsCache(); @@ -567,7 +566,7 @@ class AppSettingsController extends Controller { * @return JSONResponse */ public function updateApp(string $appId): JSONResponse { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $this->config->setSystemValue('maintenance', true); try { @@ -594,7 +593,7 @@ class AppSettingsController extends Controller { } public function force(string $appId): JSONResponse { - $appId = OC_App::cleanAppId($appId); + $appId = $this->appManager->cleanAppId($appId); $this->appManager->ignoreNextcloudRequirementForApp($appId); return new JSONResponse(); } |