aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-05-29 08:05:30 +0200
committerJulius Härtl <jus@bitgrid.net>2019-06-05 13:52:46 +0200
commit8f2e8fa324f0115ee127a423e93014629962b6ae (patch)
treea8c1d9f025cb043b49dfa9125ae5b0d3eb66a00f
parentad62974a8140eb649e763bae164c7f831cc44def (diff)
downloadnextcloud-server-8f2e8fa324f0115ee127a423e93014629962b6ae.tar.gz
nextcloud-server-8f2e8fa324f0115ee127a423e93014629962b6ae.zip
Run repair steps when enabling an app that has already been installed
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--lib/private/Installer.php8
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']);