Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions core/Command/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,7 @@ public function __construct(IConfig $config, ILogger $logger, Installer $install
protected function configure() {
$this
->setName('upgrade')
->setDescription('run upgrade routines after installation of a new release. The release has to be installed before.')
->addOption(
'--no-app-disable',
null,
InputOption::VALUE_NONE,
'skips the disable of third party apps'
);
->setDescription('run upgrade routines after installation of a new release. The release has to be installed before.');
}

/**
Expand All @@ -108,9 +102,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$this->installer
);

if ($input->getOption('no-app-disable')) {
$updater->setSkip3rdPartyAppsDisable(true);
}
$dispatcher = \OC::$server->getEventDispatcher();
$progress = new ProgressBar($output);
$progress->setFormat(" %message%\n %current%/%max% [%bar%] %percent:3s%%");
Expand Down Expand Up @@ -224,9 +215,6 @@ function ($success) use($output, $self) {
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($output) {
$output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>');
});
$updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use ($output) {
$output->writeln('<comment>Disabled 3rd-party app: ' . $app . '</comment>');
});
$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) {
$output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>');
});
Expand Down
7 changes: 0 additions & 7 deletions core/ajax/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public function handleRepairFeedback($event) {
\OC::$server->query(\OC\Installer::class)
);
$incompatibleApps = [];
$disabledThirdPartyApps = [];

$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) {
Expand Down Expand Up @@ -187,9 +186,6 @@ public function handleRepairFeedback($event) {
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
$incompatibleApps[]= $app;
});
$updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use (&$disabledThirdPartyApps) {
$disabledThirdPartyApps[]= $app;
});
$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) {
$eventSource->send('failure', $message);
$eventSource->close();
Expand Down Expand Up @@ -217,9 +213,6 @@ public function handleRepairFeedback($event) {
}

$disabledApps = [];
foreach ($disabledThirdPartyApps as $app) {
$disabledApps[$app] = (string) $l->t('%s (3rdparty)', [$app]);
}
foreach ($incompatibleApps as $app) {
$disabledApps[$app] = (string) $l->t('%s (incompatible)', [$app]);
}
Expand Down
29 changes: 0 additions & 29 deletions lib/private/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ class Updater extends BasicEmitter {
/** @var Installer */
private $installer;

/** @var bool */
private $skip3rdPartyAppsDisable;

private $logLevelNames = [
0 => 'Debug',
1 => 'Info',
Expand All @@ -91,22 +88,6 @@ public function __construct(IConfig $config,
$this->config = $config;
$this->checker = $checker;
$this->installer = $installer;

// If at least PHP 7.0.0 is used we don't need to disable apps as we catch
// fatal errors and exceptions and disable the app just instead.
if(version_compare(phpversion(), '7.0.0', '>=')) {
$this->skip3rdPartyAppsDisable = true;
}
}

/**
* 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;
}

/**
Expand Down Expand Up @@ -437,13 +418,6 @@ private function checkAppsRequirements() {
if (OC_App::isType($app, ['session', 'authentication'])) {
continue;
}

// 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;
}
Expand Down Expand Up @@ -597,9 +571,6 @@ private function logAllEvents() {
$this->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($log) {
$log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: ' . $app, ['app' => 'updater']);
});
$this->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use ($log) {
$log->info('\OC\Updater::thirdPartyAppDisabled: Disabled 3rd-party app: ' . $app, ['app' => 'updater']);
});
$this->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($log) {
$log->info('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "' . $app . '" in appstore', ['app' => 'updater']);
});
Expand Down
1 change: 0 additions & 1 deletion tests/lib/AppFramework/Http/JSONResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public function testRender(array $input, $expected) {
/**
* @expectedException \Exception
* @expectedExceptionMessage Could not json_encode due to invalid non UTF-8 characters in the array: array (
* @requires PHP 5.5
*/
public function testRenderWithNonUtf8Encoding() {
$params = ['test' => hex2bin('e9')];
Expand Down
7 changes: 0 additions & 7 deletions tests/lib/UpdaterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,4 @@ public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersions
$this->assertSame($result, $this->updater->isUpgradePossible($oldVersion, $newVersion, $allowedVersions));
}

public function testSetSkip3rdPartyAppsDisable() {
$this->updater->setSkip3rdPartyAppsDisable(true);
$this->assertSame(true, $this->invokePrivate($this->updater, 'skip3rdPartyAppsDisable'));
$this->updater->setSkip3rdPartyAppsDisable(false);
$this->assertSame(false, $this->invokePrivate($this->updater, 'skip3rdPartyAppsDisable'));
}

}