diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/App/Install.php | 8 | ||||
-rw-r--r-- | core/Command/Maintenance/Install.php | 13 | ||||
-rw-r--r-- | core/Command/Upgrade.php | 8 | ||||
-rw-r--r-- | core/ajax/update.php | 3 | ||||
-rw-r--r-- | core/register_command.php | 2 |
5 files changed, 20 insertions, 14 deletions
diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php index c8c4652d7ba..8f530975be9 100644 --- a/core/Command/App/Install.php +++ b/core/Command/App/Install.php @@ -51,13 +51,7 @@ class Install extends Command { } try { - $installer = new Installer( - \OC::$server->getAppFetcher(), - \OC::$server->getHTTPClientService(), - \OC::$server->getTempManager(), - \OC::$server->getLogger(), - \OC::$server->getConfig() - ); + $installer = \OC::$server->query(Installer::class); $installer->downloadApp($appId); $result = $installer->installApp($appId); } catch(\Exception $e) { diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index 755d3d386c1..be6a2da22c8 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -30,6 +30,7 @@ namespace OC\Core\Command\Maintenance; use InvalidArgumentException; +use OC\Installer; use OC\Setup; use OC\SystemConfig; use OCP\Defaults; @@ -73,9 +74,15 @@ class Install extends Command { // validate the environment $server = \OC::$server; - $setupHelper = new Setup($this->config, $server->getIniWrapper(), - $server->getL10N('lib'), $server->query(Defaults::class), $server->getLogger(), - $server->getSecureRandom()); + $setupHelper = new Setup( + $this->config, + $server->getIniWrapper(), + $server->getL10N('lib'), + $server->query(Defaults::class), + $server->getLogger(), + $server->getSecureRandom(), + \OC::$server->query(Installer::class) + ); $sysInfo = $setupHelper->getSystemInfo(true); $errors = $sysInfo['errors']; if (count($errors) > 0) { diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 0877c19bc01..2a502dbe921 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -35,6 +35,7 @@ namespace OC\Core\Command; use OC\Console\TimestampFormatter; +use OC\Installer; use OC\Updater; use OCP\IConfig; use OCP\ILogger; @@ -63,11 +64,13 @@ class Upgrade extends Command { /** * @param IConfig $config * @param ILogger $logger + * @param Installer $installer */ - public function __construct(IConfig $config, ILogger $logger) { + public function __construct(IConfig $config, ILogger $logger, Installer $installer) { parent::__construct(); $this->config = $config; $this->logger = $logger; + $this->installer = $installer; } protected function configure() { @@ -101,7 +104,8 @@ class Upgrade extends Command { $updater = new Updater( $this->config, \OC::$server->getIntegrityCodeChecker(), - $this->logger + $this->logger, + $this->installer ); if ($input->getOption('no-app-disable')) { diff --git a/core/ajax/update.php b/core/ajax/update.php index 71d60f5c432..2a29d1e536c 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -116,7 +116,8 @@ if (OC::checkUpgrade(false)) { $updater = new \OC\Updater( $config, \OC::$server->getIntegrityCodeChecker(), - $logger + $logger, + \OC::$server->query(\OC\Installer::class) ); $incompatibleApps = []; $disabledThirdPartyApps = []; diff --git a/core/register_command.php b/core/register_command.php index 3f7fbf508e5..60e151a5f2c 100644 --- a/core/register_command.php +++ b/core/register_command.php @@ -137,7 +137,7 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) { $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); - $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger())); + $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); $application->add(new OC\Core\Command\Maintenance\Repair( new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(), \OC::$server->getEventDispatcher(), \OC::$server->getAppManager())); |