diff --git a/lib/private/app.php b/lib/private/app.php index 81e74a5167..7bf04f1126 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -831,13 +831,8 @@ class OC_App { // Remove duplicates foreach ($appList as $app) { foreach ($remoteApps AS $key => $remote) { - if ( - $app['name'] == $remote['name'] - // To set duplicate detection to use OCS ID instead of string name, - // enable this code, remove the line of code above, - // and add [ID] to info.xml of each 3rd party app: - // OR $app['ocs_id'] == $remote['ocs_id'] - ) { + if ($app['name'] === $remote['name'] || + $app['ocsid'] === $remote['id']) { unset($remoteApps[$key]); } } diff --git a/lib/private/installer.php b/lib/private/installer.php index 29470dbe3a..f9d0b36afb 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -377,9 +377,8 @@ class OC_Installer{ $ocsdata=OC_OCSClient::getApplication($ocsid); $ocsversion= (string) $ocsdata['version']; $currentversion=OC_App::getAppVersion($app); - if($ocsversion<>$currentversion) { + if (version_compare($ocsversion, $currentversion, '>')) { return($ocsversion); - }else{ return false; }