summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-08-02 19:32:13 +0200
committerGitHub <noreply@github.com>2018-08-02 19:32:13 +0200
commit8d08cfc87f4d38705d9c1cb5d7717700055bc0fd (patch)
treec6eabd33a470b92d25e6a78a503a16a56f6a8343
parent94c35d542f54d617b5d0299c2cd0c86d0a0d8f9d (diff)
parent483ad01a0933751732d84f40fab61c45050a7fa8 (diff)
downloadnextcloud-server-8d08cfc87f4d38705d9c1cb5d7717700055bc0fd.tar.gz
nextcloud-server-8d08cfc87f4d38705d9c1cb5d7717700055bc0fd.zip
Merge pull request #10508 from nextcloud/bugfix/noid/app-management
Fix app management not providing updates for apps which got disabled
-rw-r--r--lib/private/Installer.php2
-rw-r--r--settings/Controller/AppSettingsController.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index b6586eceabe..d58ccb36943 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -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;
diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php
index 5930bc700d4..61db1ce2697 100644
--- a/settings/Controller/AppSettingsController.php
+++ b/settings/Controller/AppSettingsController.php
@@ -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;
}