Merge pull request #10508 from nextcloud/bugfix/noid/app-management

Fix app management not providing updates for apps which got disabled
This commit is contained in:
Roeland Jago Douma 2018-08-02 19:32:13 +02:00 committed by GitHub
commit 8d08cfc87f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -389,7 +389,7 @@ class Installer {
if($app['id'] === $appId) {
$currentVersion = OC_App::getAppVersion($appId);
$newestVersion = $app['releases'][0]['version'];
if (version_compare($newestVersion, $currentVersion, '>')) {
if ($currentVersion !== '0' && version_compare($newestVersion, $currentVersion, '>')) {
return $newestVersion;
} else {
return false;

View File

@ -214,7 +214,7 @@ class AppSettingsController extends Controller {
if (!array_key_exists($app['id'], $this->allApps)) {
$this->allApps[$app['id']] = $app;
} else {
$this->allApps[$app['id']] = array_merge($this->allApps[$app['id']], $app);
$this->allApps[$app['id']] = array_merge($app, $this->allApps[$app['id']]);
}
}
@ -256,7 +256,7 @@ class AppSettingsController extends Controller {
$appData['category'] = $appstoreData['categories'];
$newVersion = $this->installer->isUpdateAvailable($appData['id']);
if($newVersion && $this->appManager->isInstalled($appData['id'])) {
if($newVersion) {
$appData['update'] = $newVersion;
}