diff options
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'); } } |