From cd60e5b63406d4f23a8c04491cbdc57b47b972cb Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 25 May 2018 14:56:54 +0200 Subject: Move logic to app management mixin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/App/AppStore/Manager.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/App/AppStore/Manager.php b/lib/private/App/AppStore/Manager.php index 1c7f09a817e..4498918da70 100644 --- a/lib/private/App/AppStore/Manager.php +++ b/lib/private/App/AppStore/Manager.php @@ -29,10 +29,13 @@ use OC\App\AppStore\Fetcher\AppFetcher; class Manager { public function __construct(AppFetcher $appFetcher) { - $this->apps = $appFetcher->get(); + $apps = $appFetcher->get(); + foreach ($apps as $app) { + $this->apps[$app['id']] = $app; + } } public function getApp(string $appId) { - return $this->apps; + return $this->apps[$appId]; } } \ No newline at end of file -- cgit v1.2.3