summaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-02-25 11:39:32 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-02-25 11:39:55 +0100
commit736d5deaeec3a7238af7bfd420c7122b321a277a (patch)
tree346252d66199a3b6168f58bbc992fd6a713a9b21 /lib/app.php
parent9ee5069f2a1d76c899eeef6cec0f06387764fabd (diff)
downloadnextcloud-server-736d5deaeec3a7238af7bfd420c7122b321a277a.tar.gz
nextcloud-server-736d5deaeec3a7238af7bfd420c7122b321a277a.zip
version checks for apps now use all three version numbers and fixed bug that would not do the version check correctly for the second version
Diffstat (limited to 'lib/app.php')
-rw-r--r--lib/app.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/app.php b/lib/app.php
index e653c30b2d9..a5618be84f1 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -223,7 +223,8 @@ class OC_App{
// check if the app is compatible with this version of ownCloud
$info=OC_App::getAppInfo($app);
$version=OC_Util::getVersion();
- if(!isset($info['require']) or ($version[0]>$info['require'])) {
+ $fullVersion = (float) ($version[0] . '.' . $version[1] . $version[2]);
+ if(!isset($info['require']) or ($fullVersion < (float) $info['require'])) {
OC_Log::write('core',
'App "'.$info['name'].'" can\'t be installed because it is'
.' not compatible with this version of ownCloud',
@@ -851,7 +852,8 @@ class OC_App{
foreach($apps as $app) {
// check if the app is compatible with this version of ownCloud
$info = OC_App::getAppInfo($app);
- if(!isset($info['require']) or (($version[0].'.'.$version[1])>$info['require'])) {
+ $fullVersion = (float) ($version[0] . '.' . $version[1] . $version[2]);
+ if(!isset($info['require']) or ($fullVersion < (float) $info['require'])) {
OC_Log::write('core',
'App "'.$info['name'].'" ('.$app.') can\'t be used because it is'
.' not compatible with this version of ownCloud',