diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2024-03-13 01:21:40 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2024-03-13 02:22:11 -0100 |
commit | 519e4345739876d2ae7e064e347d19524905b090 (patch) | |
tree | 0b997f8d18f54efcb97e9278503ae42e119fd9b6 /core/ajax | |
parent | 5723c13dc0c7f4025c4d976c1f792f9bb3513fe2 (diff) | |
download | nextcloud-server-519e4345739876d2ae7e064e347d19524905b090.tar.gz nextcloud-server-519e4345739876d2ae7e064e347d19524905b090.zip |
fix(updatenotification): spread the use of new appconfig
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'core/ajax')
-rw-r--r-- | core/ajax/update.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php index ed5fe00e147..d44dbbf5e38 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -40,10 +40,13 @@ use OC\Repair\Events\RepairStepEvent; use OC\Repair\Events\RepairWarningEvent; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventDispatcher; +use OCP\IAppConfig; +use OCP\IConfig; use OCP\IEventSource; use OCP\IEventSourceFactory; use OCP\IL10N; use OCP\L10N\IFactory; +use OCP\Server; use Psr\Log\LoggerInterface; if (!str_contains(@ini_get('disable_functions'), 'set_time_limit')) { @@ -111,13 +114,13 @@ if (\OCP\Util::needUpgrade()) { // avoid side effects \OC_User::setIncognitoMode(true); - $logger = \OC::$server->get(\Psr\Log\LoggerInterface::class); - $config = \OC::$server->getConfig(); + $config = Server::get(IConfig::class); $updater = new \OC\Updater( $config, + Server::get(IAppConfig::class), \OC::$server->getIntegrityCodeChecker(), - $logger, - \OC::$server->query(\OC\Installer::class) + Server::get(LoggerInterface::class), + Server::get(\OC\Installer::class) ); $incompatibleApps = []; $incompatibleOverwrites = $config->getSystemValue('app_install_overwrite', []); @@ -189,7 +192,7 @@ if (\OCP\Util::needUpgrade()) { try { $updater->upgrade(); } catch (\Exception $e) { - \OCP\Server::get(LoggerInterface::class)->error( + Server::get(LoggerInterface::class)->error( $e->getMessage(), [ 'exception' => $e, |