diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-21 10:17:38 +0300 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-21 10:17:38 +0300 |
commit | 9200bbeabad801d54f69a1fedf23292afda27521 (patch) | |
tree | ae56f57aecd475169367f92cc692541e3b9a3c6f /lib/private/updater.php | |
parent | 74f41349b76e258e17fe4a39d7845fdcca3d554f (diff) |
Update: state which step we are going to start and warn if it might be slow
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r-- | lib/private/updater.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php index 70d68863788..9e5207c2a18 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -337,6 +337,8 @@ class Updater extends BasicEmitter { } protected function checkCoreUpgrade() { + $this->emit('\OC\Updater', 'dbSimulateUpgradeBefore'); + // simulate core DB upgrade \OC_DB::simulateUpdateDbFromStructure(\OC::$SERVERROOT . '/db_structure.xml'); @@ -344,6 +346,8 @@ class Updater extends BasicEmitter { } protected function doCoreUpgrade() { + $this->emit('\OC\Updater', 'dbUpgradeBefore'); + // do the real upgrade \OC_DB::updateDbFromStructure(\OC::$SERVERROOT . '/db_structure.xml'); @@ -355,6 +359,7 @@ class Updater extends BasicEmitter { */ protected function checkAppUpgrade($version) { $apps = \OC_App::getEnabledApps(); + $this->emit('\OC\Updater', 'appUpgradeCheckBefore'); foreach ($apps as $appId) { $info = \OC_App::getAppInfo($appId); @@ -372,6 +377,7 @@ class Updater extends BasicEmitter { $this->includePreUpdate($appId); } if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/database.xml')) { + $this->emit('\OC\Updater', 'appSimulateUpdate', array($appId)); \OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId) . '/appinfo/database.xml'); } } |