fix for 2-digit version-numbers (dependency on 1.2 is ok with a 1.2.xxx version)

This commit is contained in:
Ralf Becker 2005-11-24 13:07:57 +00:00
parent 0e16ad0dc5
commit 759a50c8c6

View File

@ -156,20 +156,21 @@
$currentver = '0.9.14.508';
}
$major = $GLOBALS['egw_setup']->get_major($currentver);
if ($major == $depsvalue)
if ($major == $depsvalue || substr($major,0,strlen($depsvalue)+1) == $depsvalue.'.')
{
$setup_info['depends'][$depkey]['status'] = True;
}
else // check if majors are equal and minors greater or equal
{
$major_depsvalue = $GLOBALS['egw_setup']->get_major($depsvalue);
list(,,,$minor_depsvalue) = explode('.',$depsvalue);
list(,,,$minor) = explode('.',$currentver);
$minor_depsvalue = array_pop(explode('.',$depsvalue));
$minor = array_pop(explode('.',$currentver));
if ($major == $major_depsvalue && $minor <= $minor_depsvalue)
{
$setup_info['depends'][$depkey]['status'] = True;
}
}
//echo "<p>app=$key depends on $depvalue[appname](".implode(',',$depvalue['versions']).") current=$currentver, major=$major, depsvalue=$depsvalue, major_depsvalue=$major_depsvalue, minor_depsvalue=$minor_depsvalue, minor=$minor ==> ".(int)$setup_info['depends'][$depkey]['status']."</p>\n";
}
}
/*