Fix check for latest version to work with versions like -rc1-dev

This commit is contained in:
Michal Čihař
2011-04-07 14:35:11 +02:00
parent 8119fa3769
commit 9433f4e78f

View File

@@ -176,7 +176,7 @@ function PMA_version_check()
function version_to_int($version) function version_to_int($version)
{ {
$matches = array(); $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)((\.|-(pl|rc|dev|beta|alpha))(\d+)?)?$/', $version, $matches)) { if (!preg_match('/^(\d+)\.(\d+)\.(\d+)((\.|-(pl|rc|dev|beta|alpha))(\d+)?(-dev)?)?$/', $version, $matches)) {
return false; return false;
} }
if (!empty($matches[6])) { if (!empty($matches[6])) {