mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
dependency on seeddms can be array of version ranges
This commit is contained in:
parent
aa0802ffae
commit
f5c2add12c
|
@ -368,14 +368,27 @@ class SeedDMS_Extension_Mgr {
|
||||||
switch($dkey) {
|
switch($dkey) {
|
||||||
case 'seeddms':
|
case 'seeddms':
|
||||||
$version = new SeedDMS_Version;
|
$version = new SeedDMS_Version;
|
||||||
$tmp = explode('-', $dval, 2);
|
if(is_array($dval)) {
|
||||||
if(self::cmpVersion($tmp[0], $version->version()) > 0 || ($tmp[1] && self::cmpVersion($tmp[1], $version->version()) < 0))
|
$fullfill = false;
|
||||||
$this->errmsgs[] = sprintf("Incorrect SeedDMS version (needs version %s)", $extconf['constraints']['depends']['seeddms']);
|
foreach($dval as $ddval) {
|
||||||
|
$tmp = explode('-', $ddval, 2);
|
||||||
|
if(self::cmpVersion($tmp[0], $version->version()) > 0 || ($tmp[1] && self::cmpVersion($tmp[1], $version->version()) < 0))
|
||||||
|
; // No within version range
|
||||||
|
else
|
||||||
|
$fullfill = true;
|
||||||
|
}
|
||||||
|
if(!$fullfill)
|
||||||
|
$this->errmsgs[] = sprintf("Incorrect SeedDMS version (needs version \"%s\")", implode('" or "', $dval));
|
||||||
|
} elseif(is_string($dval)) {
|
||||||
|
$tmp = explode('-', $dval, 2);
|
||||||
|
if(self::cmpVersion($tmp[0], $version->version()) > 0 || ($tmp[1] && self::cmpVersion($tmp[1], $version->version()) < 0))
|
||||||
|
$this->errmsgs[] = sprintf("Incorrect SeedDMS version (needs version %s)", $extconf['constraints']['depends']['seeddms']);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'php':
|
case 'php':
|
||||||
$tmp = explode('-', $dval, 2);
|
$tmp = explode('-', $dval, 2);
|
||||||
if(self::cmpVersion($tmp[0], phpversion()) > 0 || ($tmp[1] && self::cmpVersion($tmp[1], phpversion()) < 0))
|
if(self::cmpVersion($tmp[0], phpversion()) > 0 || ($tmp[1] && self::cmpVersion($tmp[1], phpversion()) < 0))
|
||||||
$this->errmsgs[] = sprintf("Incorrect PHP version (needs version %s)", $extconf['constraints']['depends']['php']);
|
$this->errmsgs[] = sprintf("Incorrect PHP version (needs version %s)", $dval);
|
||||||
break;
|
break;
|
||||||
case 'phpext':
|
case 'phpext':
|
||||||
if(is_array($dval) && $dval) {
|
if(is_array($dval) && $dval) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user