Detect versions that are NEWER than the most recent release as development versions

This commit is contained in:
james 2007-10-25 15:54:32 +00:00
parent e00e210690
commit 4cd4738a4f

View File

@ -54,15 +54,20 @@
echo i18n("Newest version available: <b>%1</b> (%2)",array($v['version'],$v['date']));
echo "<br />";
echo "<br />";
if($v['version']==$config['version'])
$val=version_compare($config['version'],$v['version']);
if($val==0)
{
echo happy(i18n("Your current version (%1) is up-to-date",array($config['version'])));
}
else
else if($val<0)
{
echo error(i18n("There is a new version available!<br />Newest version: %1 Released on %2",array($v['version'],$v['date'])));
echo i18n("The newest version can be downloaded from <a target=\"_blank\" href=\"http://www.sfiab.ca/download.php\">http://www.sfiab.ca/download.php</a>");
}
else if($val>0)
{
echo happy(i18n("You are running a newer (probably a development) version (%1) that is newer than the most recent release (%2)",array($config['version'],$v['version'])));
}
}
else