bug fixed: accept Piwigo version with a pattern like 2.3.0beta1 in plugins/themes/languages/updates management classes

git-svn-id: http://piwigo.org/svn/trunk@11185 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2011-06-01 10:45:45 +00:00
parent d29c7cd0a8
commit 53b859811f
4 changed files with 4 additions and 4 deletions

View file

@ -230,7 +230,7 @@ UPDATE '.USER_INFOS_TABLE.'
$url = PEM_URL . '/api/get_version_list.php';
if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
{
if (!preg_match('/^\d+\.\d+\.\d+/', $version))
if (!preg_match('/^\d+\.\d+\.\d+$/', $version))
{
$version = $pem_versions[0]['name'];
}

View file

@ -269,7 +269,7 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id=\'' . $plugin_id . '\'';
$url = PEM_URL . '/api/get_version_list.php?category=12&format=php';
if (fetchRemote($url, $result) and $pem_versions = @unserialize($result))
{
if (!preg_match('/^\d+\.\d+\.\d+/', $version))
if (!preg_match('/^\d+\.\d+\.\d+$/', $version))
{
$version = $pem_versions[0]['name'];
}

View file

@ -441,7 +441,7 @@ SELECT
$url = PEM_URL . '/api/get_version_list.php';
if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
{
if (!preg_match('/^\d+\.\d+\.\d+/', $version))
if (!preg_match('/^\d+\.\d+\.\d+$/', $version))
{
$version = $pem_versions[0]['name'];
}

View file

@ -59,7 +59,7 @@ class updates
$url = PEM_URL . '/api/get_version_list.php';
if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
{
if (!preg_match('/^\d+\.\d+\.\d+/', $version))
if (!preg_match('/^\d+\.\d+\.\d+$/', $version))
{
$version = $pem_versions[0]['name'];
}