diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-21 15:52:19 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-21 15:52:19 +0300 |
commit | f7f2a160dd2fa3a5ad56a854cbe0fb6c522badcd (patch) | |
tree | 7f450af83efd4924467ce51d31af5370e25e5cb3 /lib/private/updater.php | |
parent | f3e208a5a775d8985dbdbc4df49d603a40edcae1 (diff) | |
parent | 9200bbeabad801d54f69a1fedf23292afda27521 (diff) |
Merge pull request #19918 from owncloud/send-begin-message
Update: state which step we are going to start and warn if it might b…
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 c18b8fb4bc8..1e4421c39d7 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -340,6 +340,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'); @@ -347,6 +349,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'); @@ -358,6 +362,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); @@ -375,6 +380,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'); } } |