diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2019-06-11 18:42:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-11 18:42:23 +0200 |
commit | 18d85d46d19ab5b8629fc3b0f46518e3a4ff240b (patch) | |
tree | 6a929ad4e2055f96d28599ebe315d177ca671286 /lib | |
parent | dc600f261954e8066772b95a5d94b0f294836a64 (diff) | |
parent | 8f2e8fa324f0115ee127a423e93014629962b6ae (diff) | |
download | nextcloud-server-18d85d46d19ab5b8629fc3b0f46518e3a4ff240b.tar.gz nextcloud-server-18d85d46d19ab5b8629fc3b0f46518e3a4ff240b.zip |
Merge pull request #15783 from nextcloud/bugfix/6015/app-enable-migration
Run repair steps when enabling an app that has already been installed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Installer.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php index a410c6a011f..b96c614aa65 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -129,6 +129,11 @@ class Installer { \OC_App::checkAppDependencies($this->config, $l, $info, $ignoreMax); \OC_App::registerAutoloading($appId, $basedir); + $previousVersion = $this->config->getAppValue($info['id'], 'installed_version', false); + if ($previousVersion) { + OC_App::executeRepairSteps($appId, $info['repair-steps']['pre-migration']); + } + //install the database if(is_file($basedir.'/appinfo/database.xml')) { if (\OC::$server->getConfig()->getAppValue($info['id'], 'installed_version') === null) { @@ -140,6 +145,9 @@ class Installer { $ms = new \OC\DB\MigrationService($info['id'], \OC::$server->getDatabaseConnection()); $ms->migrate(); } + if ($previousVersion) { + OC_App::executeRepairSteps($appId, $info['repair-steps']['post-migration']); + } \OC_App::setupBackgroundJobs($info['background-jobs']); |