From a5ba5bb19fdbc2216c2bb831f7c170818f41fa95 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 12 Aug 2016 13:23:14 +0200 Subject: [PATCH] register app autoload instead of loading apps --- apps/systemtags/lib/Settings/Admin.php | 8 -------- lib/private/Installer.php | 3 ++- lib/private/legacy/app.php | 9 ++++++--- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/apps/systemtags/lib/Settings/Admin.php b/apps/systemtags/lib/Settings/Admin.php index 351c226439..ed72e17cf5 100644 --- a/apps/systemtags/lib/Settings/Admin.php +++ b/apps/systemtags/lib/Settings/Admin.php @@ -23,19 +23,11 @@ namespace OCA\SystemTags\Settings; -use OCA\Federation\TrustedServers; use OCP\AppFramework\Http\TemplateResponse; use OCP\Settings\ISettings; class Admin implements ISettings { - /** @var TrustedServers */ - private $trustedServers; - - public function __construct(TrustedServers $trustedServers) { - $this->trustedServers = $trustedServers; - } - /** * @return TemplateResponse */ diff --git a/lib/private/Installer.php b/lib/private/Installer.php index 1c45679cd3..3d8a923417 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -594,7 +594,8 @@ class Installer { OC_App::setAppTypes($info['id']); if(isset($info['settings']) && is_array($info['settings'])) { - \OC_App::loadApp($app, false); + // requires that autoloading was registered for the app, + // as happens before running the install.php some lines above \OC::$server->getSettingsManager()->setupSettings($info['settings']); } diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 4144f3f6cf..b39f5fa789 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -348,7 +348,8 @@ class OC_App { $info = self::getAppInfo($app); if(isset($info['settings']) && is_array($info['settings'])) { - self::loadApp($app, false); + $appPath = self::getAppPath($app); + self::registerAutoloading($app, $appPath); \OC::$server->getSettingsManager()->setupSettings($info['settings']); } } @@ -1170,7 +1171,8 @@ class OC_App { } if(isset($info['settings']) && is_array($info['settings'])) { - self::loadApp($app, false); + $appPath = self::getAppPath($app); + self::registerAutoloading($app, $appPath); \OC::$server->getSettingsManager()->setupSettings($info['settings']); } @@ -1212,7 +1214,8 @@ class OC_App { } self::setupBackgroundJobs($appData['background-jobs']); if(isset($appData['settings']) && is_array($appData['settings'])) { - self::loadApp($appId, false); + $appPath = self::getAppPath($appId); + self::registerAutoloading($appId, $appPath); \OC::$server->getSettingsManager()->setupSettings($appData['settings']); }