[Pkg-owncloud-commits] [owncloud] 65/95: 3rd-party apps are only disabled in case core is upgraded
David Prévot
taffit at moszumanska.debian.org
Wed Mar 11 15:49:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.1
in repository owncloud.
commit 5c7157e0af7644037f697dbb61d1533440a7e5e6
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Tue Feb 24 12:51:55 2015 +0100
3rd-party apps are only disabled in case core is upgraded
---
lib/private/updater.php | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 7d252af..485bf7e 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -337,6 +337,7 @@ class Updater extends BasicEmitter {
* party apps installed.
*/
private function checkAppsRequirements() {
+ $isCoreUpgrade = $this->isCodeUpgrade();
$apps = OC_App::getEnabledApps();
$version = OC_Util::getVersion();
foreach ($apps as $app) {
@@ -346,6 +347,10 @@ class Updater extends BasicEmitter {
OC_App::disable($app);
$this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app));
}
+ // no need to disable any app in case this is a non-core upgrade
+ if (!$isCoreUpgrade) {
+ continue;
+ }
// shipped apps will remain enabled
if (OC_App::isShipped($app)) {
continue;
@@ -360,5 +365,14 @@ class Updater extends BasicEmitter {
$this->emit('\OC\Updater', 'thirdPartyAppDisabled', array($app));
}
}
+
+ private function isCodeUpgrade() {
+ $installedVersion = $this->config->getSystemValue('version', '0.0.0');
+ $currentVersion = implode('.', OC_Util::getVersion());
+ if (version_compare($currentVersion, $installedVersion, '>')) {
+ return true;
+ }
+ return false;
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list