|
|
|
|
@ -250,6 +250,7 @@ class Updater extends BasicEmitter { |
|
|
|
|
|
|
|
|
|
// upgrade appstore apps |
|
|
|
|
$this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps()); |
|
|
|
|
$this->upgradeAppStoreApps(\OC_App::$autoDisabledApps, true); |
|
|
|
|
|
|
|
|
|
// install new shipped apps on upgrade |
|
|
|
|
OC_App::loadApps(['authentication']); |
|
|
|
|
@ -430,9 +431,10 @@ class Updater extends BasicEmitter { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param array $disabledApps |
|
|
|
|
* @param bool $reenable |
|
|
|
|
* @throws \Exception |
|
|
|
|
*/ |
|
|
|
|
private function upgradeAppStoreApps(array $disabledApps) { |
|
|
|
|
private function upgradeAppStoreApps(array $disabledApps, $reenable = false) { |
|
|
|
|
foreach($disabledApps as $app) { |
|
|
|
|
try { |
|
|
|
|
$this->emit('\OC\Updater', 'checkAppStoreAppBefore', [$app]); |
|
|
|
|
@ -441,6 +443,11 @@ class Updater extends BasicEmitter { |
|
|
|
|
$this->installer->updateAppstoreApp($app); |
|
|
|
|
} |
|
|
|
|
$this->emit('\OC\Updater', 'checkAppStoreApp', [$app]); |
|
|
|
|
|
|
|
|
|
if ($reenable) { |
|
|
|
|
$ocApp = new \OC_App(); |
|
|
|
|
$ocApp->enable($app); |
|
|
|
|
} |
|
|
|
|
} catch (\Exception $ex) { |
|
|
|
|
$this->log->logException($ex, ['app' => 'core']); |
|
|
|
|
} |
|
|
|
|
|