From da3b449169bc0ce0c6c2e2bb06f1d971234e536d Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 3 Oct 2018 09:45:09 +0200 Subject: using AppManager - #390 Signed-off-by: Maxence Lange --- lib/Service/PlatformService.php | 7 +++---- lib/Service/ProviderService.php | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/Service/PlatformService.php b/lib/Service/PlatformService.php index 6a276ea..304116d 100644 --- a/lib/Service/PlatformService.php +++ b/lib/Service/PlatformService.php @@ -21,14 +21,13 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . - * + * */ namespace OCA\FullTextSearch\Service; use Exception; use OC\App\AppManager; -use OC_App; use OCA\FullTextSearch\Exceptions\PlatformDoesNotExistException; use OCA\FullTextSearch\Exceptions\PlatformIsNotCompatibleException; use OCA\FullTextSearch\Exceptions\PlatformNotSelectedException; @@ -194,7 +193,7 @@ class PlatformService { * @param string $appId */ private function loadPlatformsFromApp($appId) { - $appInfo = OC_App::getAppInfo($appId); + $appInfo = $this->appManager->getAppInfo($appId); if (!is_array($appInfo) || !key_exists('fulltextsearch', $appInfo) || !key_exists('platform', $appInfo['fulltextsearch'])) { return; @@ -209,4 +208,4 @@ class PlatformService { } -} \ No newline at end of file +} diff --git a/lib/Service/ProviderService.php b/lib/Service/ProviderService.php index 52d5143..ac120f3 100644 --- a/lib/Service/ProviderService.php +++ b/lib/Service/ProviderService.php @@ -28,7 +28,6 @@ namespace OCA\FullTextSearch\Service; use Exception; use OC\App\AppManager; -use OC_App; use OCA\FullTextSearch\Exceptions\ProviderDoesNotExistException; use OCA\FullTextSearch\Exceptions\ProviderIsNotCompatibleException; use OCA\FullTextSearch\Exceptions\ProviderIsNotUniqueException; @@ -236,7 +235,7 @@ class ProviderService { * @throws QueryException */ private function loadProvidersFromApp($appId) { - $appInfo = OC_App::getAppInfo($appId); + $appInfo = $this->appManager->getAppInfo($appId); if (!is_array($appInfo) || !key_exists('fulltextsearch', $appInfo) || !key_exists('provider', $appInfo['fulltextsearch'])) { return; @@ -298,4 +297,4 @@ class ProviderService { return $arr; } -} \ No newline at end of file +} -- cgit v1.2.3