diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-12 16:17:19 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-13 10:08:43 +0200 |
commit | 7ed583cb8ee64f77696b0e23f79d8d1b4038bcbc (patch) | |
tree | d6c7117c08cd346c300fab6f8de9baedcbaca8a8 /core/Command/L10n | |
parent | c9e4598360335d7eab0f4a5153dbf16a1f161351 (diff) | |
download | nextcloud-server-7ed583cb8ee64f77696b0e23f79d8d1b4038bcbc.tar.gz nextcloud-server-7ed583cb8ee64f77696b0e23f79d8d1b4038bcbc.zip |
chore: Migrate cleanAppId and getAppPath calls to IAppManager from OC_App
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/Command/L10n')
-rw-r--r-- | core/Command/L10n/CreateJs.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php index 517016b7e16..27d537b093e 100644 --- a/core/Command/L10n/CreateJs.php +++ b/core/Command/L10n/CreateJs.php @@ -11,6 +11,7 @@ namespace OC\Core\Command\L10n; use DirectoryIterator; +use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareInterface; use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; @@ -150,7 +151,11 @@ class CreateJs extends Command implements CompletionAwareInterface { return \OC_App::getAllApps(); } elseif ($argumentName === 'lang') { $appName = $context->getWordAtIndex($context->getWordIndex() - 1); - return $this->getAllLanguages(\OC_App::getAppPath($appName)); + try { + return $this->getAllLanguages($this->appManager->getAppPath($appName)); + } catch(AppPathNotFoundException) { + return []; + } } return []; } |