return true once one owncloud version number is bigger at any position
This commit is contained in:
parent
946a064fc6
commit
f415f3e03e
|
@ -885,6 +885,8 @@ class OC_App{
|
||||||
|
|
||||||
if($owncloudVersion < $appVersion){
|
if($owncloudVersion < $appVersion){
|
||||||
return false;
|
return false;
|
||||||
|
} elseif ($owncloudVersion > $appVersion) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,14 @@ class Test_App extends PHPUnit_Framework_TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testIsAppVersionCompatibleComplex(){
|
||||||
|
$oc = array(5, 0, 0);
|
||||||
|
$app = '4.5.1';
|
||||||
|
|
||||||
|
$this->assertTrue(OC_App::isAppVersionCompatible($oc, $app));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testIsAppVersionCompatibleShouldFail(){
|
public function testIsAppVersionCompatibleShouldFail(){
|
||||||
$oc = array(4, 3, 1);
|
$oc = array(4, 3, 1);
|
||||||
$app = '4.3.2';
|
$app = '4.3.2';
|
||||||
|
|
Loading…
Reference in New Issue