Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteffen Lindner <mail@steffen-lindner.de>2015-05-20 18:06:00 +0300
committerSteffen Lindner <mail@steffen-lindner.de>2015-05-20 18:06:00 +0300
commit48040c46cb6ebcfbe6e7070d82e411be4ed12d2e (patch)
tree075cc0b3d547064ebebf8c5459df6acac852001d /lib/private/updater.php
parent39d1e99228a22e232795b9800503697b866f5023 (diff)
Skip disable3rdParty Apps
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r--lib/private/updater.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 59b1c0a8f66..8371193ef79 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -65,6 +65,9 @@ class Updater extends BasicEmitter {
/** @var bool */
private $updateStepEnabled;
+ /** @var bool */
+ private $skip3rdPartyAppsDisable;
+
/**
* @param HTTPHelper $httpHelper
* @param IConfig $config
@@ -100,6 +103,16 @@ class Updater extends BasicEmitter {
}
/**
+ * Sets whether the update disables 3rd party apps.
+ * This can be set to true to skip the disable.
+ *
+ * @param bool $flag false to not disable, true otherwise
+ */
+ public function setSkip3rdPartyAppsDisable($flag) {
+ $this->skip3rdPartyAppsDisable = $flag;
+ }
+
+ /**
* Check if a new version is available
*
* @param string $updaterUrl the url to check, i.e. 'http://apps.owncloud.com/updater.php'
@@ -407,10 +420,12 @@ class Updater extends BasicEmitter {
continue;
}
- // disable any other 3rd party apps
- \OC_App::disable($app);
- $disabledApps[]= $app;
- $this->emit('\OC\Updater', 'thirdPartyAppDisabled', array($app));
+ // disable any other 3rd party apps if not overriden
+ if(!$this->skip3rdPartyAppsDisable) {
+ \OC_App::disable($app);
+ $disabledApps[]= $app;
+ $this->emit('\OC\Updater', 'thirdPartyAppDisabled', array($app));
+ };
}
return $disabledApps;
}