diff options
author | Steffen Lindner <mail@steffen-lindner.de> | 2015-05-20 17:06:00 +0200 |
---|---|---|
committer | Steffen Lindner <mail@steffen-lindner.de> | 2015-05-20 17:06:00 +0200 |
commit | 48040c46cb6ebcfbe6e7070d82e411be4ed12d2e (patch) | |
tree | 075cc0b3d547064ebebf8c5459df6acac852001d /lib/private/updater.php | |
parent | 39d1e99228a22e232795b9800503697b866f5023 (diff) | |
download | nextcloud-server-48040c46cb6ebcfbe6e7070d82e411be4ed12d2e.tar.gz nextcloud-server-48040c46cb6ebcfbe6e7070d82e411be4ed12d2e.zip |
Skip disable3rdParty Apps
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r-- | lib/private/updater.php | 23 |
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; } |