Browse Source
Improve usage of IAppManager::getAppWebPath()
Deprecate \OC_App::getAppWebPath() and \OC_App::getAppPath()
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
pull/16859/head
Daniel Rudolf
6 years ago
No known key found for this signature in database
GPG Key ID: A061F02CD8DE4538
3 changed files with
5 additions and
3 deletions
-
lib/private/App/AppManager.php
-
lib/private/legacy/app.php
-
lib/public/App/IAppManager.php
|
|
|
@ -411,7 +411,7 @@ class AppManager implements IAppManager { |
|
|
|
* @return string |
|
|
|
* @throws AppPathNotFoundException if app path can't be found |
|
|
|
*/ |
|
|
|
public function getAppWebPath($appId) { |
|
|
|
public function getAppWebPath(string $appId): string { |
|
|
|
$appWebPath = \OC_App::getAppWebPath($appId); |
|
|
|
if($appWebPath === false) { |
|
|
|
throw new AppPathNotFoundException('Could not find web path for ' . $appId); |
|
|
|
|
|
|
|
@ -485,6 +485,7 @@ class OC_App { |
|
|
|
* |
|
|
|
* @param string $appId |
|
|
|
* @return string|false |
|
|
|
* @deprecated 11.0.0 use \OC::$server->getAppManager()->getAppPath() |
|
|
|
*/ |
|
|
|
public static function getAppPath(string $appId) { |
|
|
|
if ($appId === null || trim($appId) === '') { |
|
|
|
@ -503,6 +504,7 @@ class OC_App { |
|
|
|
* |
|
|
|
* @param string $appId |
|
|
|
* @return string|false |
|
|
|
* @deprecated 18.0.0 use \OC::$server->getAppManager()->getAppWebPath() |
|
|
|
*/ |
|
|
|
public static function getAppWebPath(string $appId) { |
|
|
|
if (($dir = self::findAppInDirectories($appId)) != false) { |
|
|
|
|
|
|
|
@ -131,10 +131,10 @@ interface IAppManager { |
|
|
|
* |
|
|
|
* @param string $appId |
|
|
|
* @return string |
|
|
|
* @since 17.0.0 |
|
|
|
* @since 18.0.0 |
|
|
|
* @throws AppPathNotFoundException |
|
|
|
*/ |
|
|
|
public function getAppWebPath($appId); |
|
|
|
public function getAppWebPath(string $appId): string; |
|
|
|
|
|
|
|
/** |
|
|
|
* List all apps enabled for a user |
|
|
|
|