@@ -67,12 +67,12 @@ discard block |
||
| 67 | 67 | return; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if(isset($post['install']) AND $post['install']=='true') { |
|
| 70 | + if (isset($post['install']) AND $post['install'] == 'true') { |
|
| 71 | 71 | // We have to launch the installation process : |
| 72 | 72 | $e = $this->setupHelper->install($post); |
| 73 | 73 | $errors = array('errors' => $e); |
| 74 | 74 | |
| 75 | - if(count($e) > 0) { |
|
| 75 | + if (count($e) > 0) { |
|
| 76 | 76 | $options = array_merge($opts, $post, $errors); |
| 77 | 77 | $this->display($options); |
| 78 | 78 | } else { |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | public function finishSetup() { |
| 109 | - if( file_exists( $this->autoConfigFile )) { |
|
| 109 | + if (file_exists($this->autoConfigFile)) { |
|
| 110 | 110 | unlink($this->autoConfigFile); |
| 111 | 111 | } |
| 112 | 112 | \OC::$server->getIntegrityCodeChecker()->runInstanceVerification(); |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | public function loadAutoConfig($post) { |
| 124 | - if( file_exists($this->autoConfigFile)) { |
|
| 124 | + if (file_exists($this->autoConfigFile)) { |
|
| 125 | 125 | \OCP\Util::writeLog('core', 'Autoconfig file found, setting up Nextcloud…', ILogger::INFO); |
| 126 | 126 | $AUTOCONFIG = array(); |
| 127 | 127 | include $this->autoConfigFile; |
| 128 | - $post = array_merge ($post, $AUTOCONFIG); |
|
| 128 | + $post = array_merge($post, $AUTOCONFIG); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | $dbIsSet = isset($post['dbtype']); |
@@ -101,19 +101,19 @@ discard block |
||
| 101 | 101 | $this->logAllEvents(); |
| 102 | 102 | |
| 103 | 103 | $logLevel = $this->config->getSystemValue('loglevel', ILogger::WARN); |
| 104 | - $this->emit('\OC\Updater', 'setDebugLogLevel', [ $logLevel, $this->logLevelNames[$logLevel] ]); |
|
| 104 | + $this->emit('\OC\Updater', 'setDebugLogLevel', [$logLevel, $this->logLevelNames[$logLevel]]); |
|
| 105 | 105 | $this->config->setSystemValue('loglevel', ILogger::DEBUG); |
| 106 | 106 | |
| 107 | 107 | $wasMaintenanceModeEnabled = $this->config->getSystemValueBool('maintenance'); |
| 108 | 108 | |
| 109 | - if(!$wasMaintenanceModeEnabled) { |
|
| 109 | + if (!$wasMaintenanceModeEnabled) { |
|
| 110 | 110 | $this->config->setSystemValue('maintenance', true); |
| 111 | 111 | $this->emit('\OC\Updater', 'maintenanceEnabled'); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | // Clear CAN_INSTALL file if not on git |
| 115 | 115 | if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) { |
| 116 | - if (!unlink(\OC::$configDir . '/CAN_INSTALL')) { |
|
| 116 | + if (!unlink(\OC::$configDir.'/CAN_INSTALL')) { |
|
| 117 | 117 | $this->log->error('Could not cleanup CAN_INSTALL from your config folder. Please remove this file manually.'); |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -121,31 +121,31 @@ discard block |
||
| 121 | 121 | $installedVersion = $this->config->getSystemValue('version', '0.0.0'); |
| 122 | 122 | $currentVersion = implode('.', \OCP\Util::getVersion()); |
| 123 | 123 | |
| 124 | - $this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, array('app' => 'core')); |
|
| 124 | + $this->log->debug('starting upgrade from '.$installedVersion.' to '.$currentVersion, array('app' => 'core')); |
|
| 125 | 125 | |
| 126 | 126 | $success = true; |
| 127 | 127 | try { |
| 128 | 128 | $this->doUpgrade($currentVersion, $installedVersion); |
| 129 | 129 | } catch (HintException $exception) { |
| 130 | 130 | $this->log->logException($exception, ['app' => 'core']); |
| 131 | - $this->emit('\OC\Updater', 'failure', array($exception->getMessage() . ': ' .$exception->getHint())); |
|
| 131 | + $this->emit('\OC\Updater', 'failure', array($exception->getMessage().': '.$exception->getHint())); |
|
| 132 | 132 | $success = false; |
| 133 | 133 | } catch (\Exception $exception) { |
| 134 | 134 | $this->log->logException($exception, ['app' => 'core']); |
| 135 | - $this->emit('\OC\Updater', 'failure', array(get_class($exception) . ': ' .$exception->getMessage())); |
|
| 135 | + $this->emit('\OC\Updater', 'failure', array(get_class($exception).': '.$exception->getMessage())); |
|
| 136 | 136 | $success = false; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | $this->emit('\OC\Updater', 'updateEnd', array($success)); |
| 140 | 140 | |
| 141 | - if(!$wasMaintenanceModeEnabled && $success) { |
|
| 141 | + if (!$wasMaintenanceModeEnabled && $success) { |
|
| 142 | 142 | $this->config->setSystemValue('maintenance', false); |
| 143 | 143 | $this->emit('\OC\Updater', 'maintenanceDisabled'); |
| 144 | 144 | } else { |
| 145 | 145 | $this->emit('\OC\Updater', 'maintenanceActive'); |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - $this->emit('\OC\Updater', 'resetLogLevel', [ $logLevel, $this->logLevelNames[$logLevel] ]); |
|
| 148 | + $this->emit('\OC\Updater', 'resetLogLevel', [$logLevel, $this->logLevelNames[$logLevel]]); |
|
| 149 | 149 | $this->config->setSystemValue('loglevel', $logLevel); |
| 150 | 150 | $this->config->setSystemValue('installed', true); |
| 151 | 151 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | private function getAllowedPreviousVersions() { |
| 161 | 161 | // this should really be a JSON file |
| 162 | - require \OC::$SERVERROOT . '/version.php'; |
|
| 162 | + require \OC::$SERVERROOT.'/version.php'; |
|
| 163 | 163 | /** @var array $OC_VersionCanBeUpgradedFrom */ |
| 164 | 164 | return $OC_VersionCanBeUpgradedFrom; |
| 165 | 165 | } |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | private function getVendor() { |
| 173 | 173 | // this should really be a JSON file |
| 174 | - require \OC::$SERVERROOT . '/version.php'; |
|
| 174 | + require \OC::$SERVERROOT.'/version.php'; |
|
| 175 | 175 | /** @var string $vendor */ |
| 176 | 176 | return (string) $vendor; |
| 177 | 177 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | public function isUpgradePossible($oldVersion, $newVersion, array $allowedPreviousVersions) { |
| 187 | 187 | $version = explode('.', $oldVersion); |
| 188 | - $majorMinor = $version[0] . '.' . $version[1]; |
|
| 188 | + $majorMinor = $version[0].'.'.$version[1]; |
|
| 189 | 189 | |
| 190 | 190 | $currentVendor = $this->config->getAppValue('core', 'vendor', ''); |
| 191 | 191 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | // create empty file in data dir, so we can later find |
| 233 | 233 | // out that this is indeed an ownCloud data directory |
| 234 | 234 | // (in case it didn't exist before) |
| 235 | - file_put_contents($this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', ''); |
|
| 235 | + file_put_contents($this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', ''); |
|
| 236 | 236 | |
| 237 | 237 | // pre-upgrade repairs |
| 238 | 238 | $repair = new Repair(Repair::getBeforeUpgradeRepairSteps(), \OC::$server->getEventDispatcher()); |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | foreach ($errors as $appId => $exception) { |
| 265 | 265 | /** @var \Exception $exception */ |
| 266 | 266 | $this->log->logException($exception, ['app' => $appId]); |
| 267 | - $this->emit('\OC\Updater', 'failure', [$appId . ': ' . $exception->getMessage()]); |
|
| 267 | + $this->emit('\OC\Updater', 'failure', [$appId.': '.$exception->getMessage()]); |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | // post-upgrade repairs |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | $this->config->setAppValue('core', 'lastupdatedat', 0); |
| 276 | 276 | |
| 277 | 277 | // Check for code integrity if not disabled |
| 278 | - if(\OC::$server->getIntegrityCodeChecker()->isCodeCheckEnforced()) { |
|
| 278 | + if (\OC::$server->getIntegrityCodeChecker()->isCodeCheckEnforced()) { |
|
| 279 | 279 | $this->emit('\OC\Updater', 'startCheckCodeIntegrity'); |
| 280 | 280 | $this->checker->runInstanceVerification(); |
| 281 | 281 | $this->emit('\OC\Updater', 'finishedCheckCodeIntegrity'); |
@@ -316,12 +316,12 @@ discard block |
||
| 316 | 316 | * @link https://github.com/owncloud/core/issues/10980 |
| 317 | 317 | * @see \OC_App::updateApp |
| 318 | 318 | */ |
| 319 | - if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/preupdate.php')) { |
|
| 319 | + if (file_exists(\OC_App::getAppPath($appId).'/appinfo/preupdate.php')) { |
|
| 320 | 320 | $this->includePreUpdate($appId); |
| 321 | 321 | } |
| 322 | - if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/database.xml')) { |
|
| 322 | + if (file_exists(\OC_App::getAppPath($appId).'/appinfo/database.xml')) { |
|
| 323 | 323 | $this->emit('\OC\Updater', 'appSimulateUpdate', array($appId)); |
| 324 | - \OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId) . '/appinfo/database.xml'); |
|
| 324 | + \OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId).'/appinfo/database.xml'); |
|
| 325 | 325 | } |
| 326 | 326 | } |
| 327 | 327 | } |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | * @param string $appId |
| 335 | 335 | */ |
| 336 | 336 | private function includePreUpdate($appId) { |
| 337 | - include \OC_App::getAppPath($appId) . '/appinfo/preupdate.php'; |
|
| 337 | + include \OC_App::getAppPath($appId).'/appinfo/preupdate.php'; |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | /** |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | foreach ($apps as $appId) { |
| 353 | 353 | $priorityType = false; |
| 354 | 354 | foreach ($priorityTypes as $type) { |
| 355 | - if(!isset($stacks[$type])) { |
|
| 355 | + if (!isset($stacks[$type])) { |
|
| 356 | 356 | $stacks[$type] = array(); |
| 357 | 357 | } |
| 358 | 358 | if (\OC_App::isType($appId, [$type])) { |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | \OC_App::updateApp($appId); |
| 373 | 373 | $this->emit('\OC\Updater', 'appUpgrade', [$appId, \OC_App::getAppVersion($appId)]); |
| 374 | 374 | } |
| 375 | - if($type !== $pseudoOtherType) { |
|
| 375 | + if ($type !== $pseudoOtherType) { |
|
| 376 | 376 | // load authentication, filesystem and logging apps after |
| 377 | 377 | // upgrading them. Other apps my need to rely on modifying |
| 378 | 378 | // user and/or filesystem aspects. |
@@ -400,9 +400,9 @@ discard block |
||
| 400 | 400 | foreach ($apps as $app) { |
| 401 | 401 | // check if the app is compatible with this version of ownCloud |
| 402 | 402 | $info = OC_App::getAppInfo($app); |
| 403 | - if($info === null || !OC_App::isAppCompatible($version, $info)) { |
|
| 403 | + if ($info === null || !OC_App::isAppCompatible($version, $info)) { |
|
| 404 | 404 | if ($appManager->isShipped($app)) { |
| 405 | - throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update'); |
|
| 405 | + throw new \UnexpectedValueException('The files of the app "'.$app.'" were not correctly replaced before running the update'); |
|
| 406 | 406 | } |
| 407 | 407 | \OC::$server->getAppManager()->disableApp($app); |
| 408 | 408 | $this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app)); |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | * @throws \Exception |
| 442 | 442 | */ |
| 443 | 443 | private function upgradeAppStoreApps(array $disabledApps, $reenable = false) { |
| 444 | - foreach($disabledApps as $app) { |
|
| 444 | + foreach ($disabledApps as $app) { |
|
| 445 | 445 | try { |
| 446 | 446 | $this->emit('\OC\Updater', 'checkAppStoreAppBefore', [$app]); |
| 447 | 447 | if ($this->installer->isUpdateAvailable($app)) { |
@@ -465,22 +465,22 @@ discard block |
||
| 465 | 465 | */ |
| 466 | 466 | private function emitRepairEvents() { |
| 467 | 467 | $dispatcher = \OC::$server->getEventDispatcher(); |
| 468 | - $dispatcher->addListener('\OC\Repair::warning', function ($event) { |
|
| 468 | + $dispatcher->addListener('\OC\Repair::warning', function($event) { |
|
| 469 | 469 | if ($event instanceof GenericEvent) { |
| 470 | 470 | $this->emit('\OC\Updater', 'repairWarning', $event->getArguments()); |
| 471 | 471 | } |
| 472 | 472 | }); |
| 473 | - $dispatcher->addListener('\OC\Repair::error', function ($event) { |
|
| 473 | + $dispatcher->addListener('\OC\Repair::error', function($event) { |
|
| 474 | 474 | if ($event instanceof GenericEvent) { |
| 475 | 475 | $this->emit('\OC\Updater', 'repairError', $event->getArguments()); |
| 476 | 476 | } |
| 477 | 477 | }); |
| 478 | - $dispatcher->addListener('\OC\Repair::info', function ($event) { |
|
| 478 | + $dispatcher->addListener('\OC\Repair::info', function($event) { |
|
| 479 | 479 | if ($event instanceof GenericEvent) { |
| 480 | 480 | $this->emit('\OC\Updater', 'repairInfo', $event->getArguments()); |
| 481 | 481 | } |
| 482 | 482 | }); |
| 483 | - $dispatcher->addListener('\OC\Repair::step', function ($event) { |
|
| 483 | + $dispatcher->addListener('\OC\Repair::step', function($event) { |
|
| 484 | 484 | if ($event instanceof GenericEvent) { |
| 485 | 485 | $this->emit('\OC\Updater', 'repairStep', $event->getArguments()); |
| 486 | 486 | } |
@@ -495,13 +495,13 @@ discard block |
||
| 495 | 495 | if (!$event instanceof GenericEvent) { |
| 496 | 496 | return; |
| 497 | 497 | } |
| 498 | - $log->info('\OC\DB\Migrator::executeSql: ' . $event->getSubject() . ' (' . $event->getArgument(0) . ' of ' . $event->getArgument(1) . ')', ['app' => 'updater']); |
|
| 498 | + $log->info('\OC\DB\Migrator::executeSql: '.$event->getSubject().' ('.$event->getArgument(0).' of '.$event->getArgument(1).')', ['app' => 'updater']); |
|
| 499 | 499 | }); |
| 500 | 500 | $dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($log) { |
| 501 | 501 | if (!$event instanceof GenericEvent) { |
| 502 | 502 | return; |
| 503 | 503 | } |
| 504 | - $log->info('\OC\DB\Migrator::checkTable: ' . $event->getSubject() . ' (' . $event->getArgument(0) . ' of ' . $event->getArgument(1) . ')', ['app' => 'updater']); |
|
| 504 | + $log->info('\OC\DB\Migrator::checkTable: '.$event->getSubject().' ('.$event->getArgument(0).' of '.$event->getArgument(1).')', ['app' => 'updater']); |
|
| 505 | 505 | }); |
| 506 | 506 | |
| 507 | 507 | $repairListener = function($event) use ($log) { |
@@ -510,30 +510,30 @@ discard block |
||
| 510 | 510 | } |
| 511 | 511 | switch ($event->getSubject()) { |
| 512 | 512 | case '\OC\Repair::startProgress': |
| 513 | - $log->info('\OC\Repair::startProgress: Starting ... ' . $event->getArgument(1) . ' (' . $event->getArgument(0) . ')', ['app' => 'updater']); |
|
| 513 | + $log->info('\OC\Repair::startProgress: Starting ... '.$event->getArgument(1).' ('.$event->getArgument(0).')', ['app' => 'updater']); |
|
| 514 | 514 | break; |
| 515 | 515 | case '\OC\Repair::advance': |
| 516 | 516 | $desc = $event->getArgument(1); |
| 517 | 517 | if (empty($desc)) { |
| 518 | 518 | $desc = ''; |
| 519 | 519 | } |
| 520 | - $log->info('\OC\Repair::advance: ' . $desc . ' (' . $event->getArgument(0) . ')', ['app' => 'updater']); |
|
| 520 | + $log->info('\OC\Repair::advance: '.$desc.' ('.$event->getArgument(0).')', ['app' => 'updater']); |
|
| 521 | 521 | |
| 522 | 522 | break; |
| 523 | 523 | case '\OC\Repair::finishProgress': |
| 524 | 524 | $log->info('\OC\Repair::finishProgress', ['app' => 'updater']); |
| 525 | 525 | break; |
| 526 | 526 | case '\OC\Repair::step': |
| 527 | - $log->info('\OC\Repair::step: Repair step: ' . $event->getArgument(0), ['app' => 'updater']); |
|
| 527 | + $log->info('\OC\Repair::step: Repair step: '.$event->getArgument(0), ['app' => 'updater']); |
|
| 528 | 528 | break; |
| 529 | 529 | case '\OC\Repair::info': |
| 530 | - $log->info('\OC\Repair::info: Repair info: ' . $event->getArgument(0), ['app' => 'updater']); |
|
| 530 | + $log->info('\OC\Repair::info: Repair info: '.$event->getArgument(0), ['app' => 'updater']); |
|
| 531 | 531 | break; |
| 532 | 532 | case '\OC\Repair::warning': |
| 533 | - $log->warning('\OC\Repair::warning: Repair warning: ' . $event->getArgument(0), ['app' => 'updater']); |
|
| 533 | + $log->warning('\OC\Repair::warning: Repair warning: '.$event->getArgument(0), ['app' => 'updater']); |
|
| 534 | 534 | break; |
| 535 | 535 | case '\OC\Repair::error': |
| 536 | - $log->error('\OC\Repair::error: Repair error: ' . $event->getArgument(0), ['app' => 'updater']); |
|
| 536 | + $log->error('\OC\Repair::error: Repair error: '.$event->getArgument(0), ['app' => 'updater']); |
|
| 537 | 537 | break; |
| 538 | 538 | } |
| 539 | 539 | }; |
@@ -547,74 +547,74 @@ discard block |
||
| 547 | 547 | $dispatcher->addListener('\OC\Repair::error', $repairListener); |
| 548 | 548 | |
| 549 | 549 | |
| 550 | - $this->listen('\OC\Updater', 'maintenanceEnabled', function () use($log) { |
|
| 550 | + $this->listen('\OC\Updater', 'maintenanceEnabled', function() use($log) { |
|
| 551 | 551 | $log->info('\OC\Updater::maintenanceEnabled: Turned on maintenance mode', ['app' => 'updater']); |
| 552 | 552 | }); |
| 553 | - $this->listen('\OC\Updater', 'maintenanceDisabled', function () use($log) { |
|
| 553 | + $this->listen('\OC\Updater', 'maintenanceDisabled', function() use($log) { |
|
| 554 | 554 | $log->info('\OC\Updater::maintenanceDisabled: Turned off maintenance mode', ['app' => 'updater']); |
| 555 | 555 | }); |
| 556 | - $this->listen('\OC\Updater', 'maintenanceActive', function () use($log) { |
|
| 556 | + $this->listen('\OC\Updater', 'maintenanceActive', function() use($log) { |
|
| 557 | 557 | $log->info('\OC\Updater::maintenanceActive: Maintenance mode is kept active', ['app' => 'updater']); |
| 558 | 558 | }); |
| 559 | - $this->listen('\OC\Updater', 'updateEnd', function ($success) use($log) { |
|
| 559 | + $this->listen('\OC\Updater', 'updateEnd', function($success) use($log) { |
|
| 560 | 560 | if ($success) { |
| 561 | 561 | $log->info('\OC\Updater::updateEnd: Update successful', ['app' => 'updater']); |
| 562 | 562 | } else { |
| 563 | 563 | $log->error('\OC\Updater::updateEnd: Update failed', ['app' => 'updater']); |
| 564 | 564 | } |
| 565 | 565 | }); |
| 566 | - $this->listen('\OC\Updater', 'dbUpgradeBefore', function () use($log) { |
|
| 566 | + $this->listen('\OC\Updater', 'dbUpgradeBefore', function() use($log) { |
|
| 567 | 567 | $log->info('\OC\Updater::dbUpgradeBefore: Updating database schema', ['app' => 'updater']); |
| 568 | 568 | }); |
| 569 | - $this->listen('\OC\Updater', 'dbUpgrade', function () use($log) { |
|
| 569 | + $this->listen('\OC\Updater', 'dbUpgrade', function() use($log) { |
|
| 570 | 570 | $log->info('\OC\Updater::dbUpgrade: Updated database', ['app' => 'updater']); |
| 571 | 571 | }); |
| 572 | - $this->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($log) { |
|
| 572 | + $this->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($log) { |
|
| 573 | 573 | $log->info('\OC\Updater::dbSimulateUpgradeBefore: Checking whether the database schema can be updated (this can take a long time depending on the database size)', ['app' => 'updater']); |
| 574 | 574 | }); |
| 575 | - $this->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($log) { |
|
| 575 | + $this->listen('\OC\Updater', 'dbSimulateUpgrade', function() use($log) { |
|
| 576 | 576 | $log->info('\OC\Updater::dbSimulateUpgrade: Checked database schema update', ['app' => 'updater']); |
| 577 | 577 | }); |
| 578 | - $this->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($log) { |
|
| 579 | - $log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: ' . $app, ['app' => 'updater']); |
|
| 578 | + $this->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use($log) { |
|
| 579 | + $log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: '.$app, ['app' => 'updater']); |
|
| 580 | 580 | }); |
| 581 | - $this->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($log) { |
|
| 582 | - $log->info('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "' . $app . '" in appstore', ['app' => 'updater']); |
|
| 581 | + $this->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use($log) { |
|
| 582 | + $log->info('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "'.$app.'" in appstore', ['app' => 'updater']); |
|
| 583 | 583 | }); |
| 584 | - $this->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($log) { |
|
| 585 | - $log->info('\OC\Updater::upgradeAppStoreApp: Update app "' . $app . '" from appstore', ['app' => 'updater']); |
|
| 584 | + $this->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use($log) { |
|
| 585 | + $log->info('\OC\Updater::upgradeAppStoreApp: Update app "'.$app.'" from appstore', ['app' => 'updater']); |
|
| 586 | 586 | }); |
| 587 | - $this->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($log) { |
|
| 588 | - $log->info('\OC\Updater::checkAppStoreApp: Checked for update of app "' . $app . '" in appstore', ['app' => 'updater']); |
|
| 587 | + $this->listen('\OC\Updater', 'checkAppStoreApp', function($app) use($log) { |
|
| 588 | + $log->info('\OC\Updater::checkAppStoreApp: Checked for update of app "'.$app.'" in appstore', ['app' => 'updater']); |
|
| 589 | 589 | }); |
| 590 | - $this->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($log) { |
|
| 590 | + $this->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($log) { |
|
| 591 | 591 | $log->info('\OC\Updater::appUpgradeCheckBefore: Checking updates of apps', ['app' => 'updater']); |
| 592 | 592 | }); |
| 593 | - $this->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($log) { |
|
| 594 | - $log->info('\OC\Updater::appSimulateUpdate: Checking whether the database schema for <' . $app . '> can be updated (this can take a long time depending on the database size)', ['app' => 'updater']); |
|
| 593 | + $this->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($log) { |
|
| 594 | + $log->info('\OC\Updater::appSimulateUpdate: Checking whether the database schema for <'.$app.'> can be updated (this can take a long time depending on the database size)', ['app' => 'updater']); |
|
| 595 | 595 | }); |
| 596 | - $this->listen('\OC\Updater', 'appUpgradeCheck', function () use ($log) { |
|
| 596 | + $this->listen('\OC\Updater', 'appUpgradeCheck', function() use ($log) { |
|
| 597 | 597 | $log->info('\OC\Updater::appUpgradeCheck: Checked database schema update for apps', ['app' => 'updater']); |
| 598 | 598 | }); |
| 599 | - $this->listen('\OC\Updater', 'appUpgradeStarted', function ($app) use ($log) { |
|
| 600 | - $log->info('\OC\Updater::appUpgradeStarted: Updating <' . $app . '> ...', ['app' => 'updater']); |
|
| 599 | + $this->listen('\OC\Updater', 'appUpgradeStarted', function($app) use ($log) { |
|
| 600 | + $log->info('\OC\Updater::appUpgradeStarted: Updating <'.$app.'> ...', ['app' => 'updater']); |
|
| 601 | 601 | }); |
| 602 | - $this->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($log) { |
|
| 603 | - $log->info('\OC\Updater::appUpgrade: Updated <' . $app . '> to ' . $version, ['app' => 'updater']); |
|
| 602 | + $this->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($log) { |
|
| 603 | + $log->info('\OC\Updater::appUpgrade: Updated <'.$app.'> to '.$version, ['app' => 'updater']); |
|
| 604 | 604 | }); |
| 605 | - $this->listen('\OC\Updater', 'failure', function ($message) use($log) { |
|
| 606 | - $log->error('\OC\Updater::failure: ' . $message, ['app' => 'updater']); |
|
| 605 | + $this->listen('\OC\Updater', 'failure', function($message) use($log) { |
|
| 606 | + $log->error('\OC\Updater::failure: '.$message, ['app' => 'updater']); |
|
| 607 | 607 | }); |
| 608 | - $this->listen('\OC\Updater', 'setDebugLogLevel', function () use($log) { |
|
| 608 | + $this->listen('\OC\Updater', 'setDebugLogLevel', function() use($log) { |
|
| 609 | 609 | $log->info('\OC\Updater::setDebugLogLevel: Set log level to debug', ['app' => 'updater']); |
| 610 | 610 | }); |
| 611 | - $this->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($log) { |
|
| 612 | - $log->info('\OC\Updater::resetLogLevel: Reset log level to ' . $logLevelName . '(' . $logLevel . ')', ['app' => 'updater']); |
|
| 611 | + $this->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($log) { |
|
| 612 | + $log->info('\OC\Updater::resetLogLevel: Reset log level to '.$logLevelName.'('.$logLevel.')', ['app' => 'updater']); |
|
| 613 | 613 | }); |
| 614 | - $this->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($log) { |
|
| 614 | + $this->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($log) { |
|
| 615 | 615 | $log->info('\OC\Updater::startCheckCodeIntegrity: Starting code integrity check...', ['app' => 'updater']); |
| 616 | 616 | }); |
| 617 | - $this->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($log) { |
|
| 617 | + $this->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($log) { |
|
| 618 | 618 | $log->info('\OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check', ['app' => 'updater']); |
| 619 | 619 | }); |
| 620 | 620 | |