mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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:
@@ -230,7 +230,7 @@ UPDATE '.USER_INFOS_TABLE.'
|
|||||||
$url = PEM_URL . '/api/get_version_list.php';
|
$url = PEM_URL . '/api/get_version_list.php';
|
||||||
if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
|
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'];
|
$version = $pem_versions[0]['name'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id=\'' . $plugin_id . '\'';
|
|||||||
$url = PEM_URL . '/api/get_version_list.php?category=12&format=php';
|
$url = PEM_URL . '/api/get_version_list.php?category=12&format=php';
|
||||||
if (fetchRemote($url, $result) and $pem_versions = @unserialize($result))
|
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'];
|
$version = $pem_versions[0]['name'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ SELECT
|
|||||||
$url = PEM_URL . '/api/get_version_list.php';
|
$url = PEM_URL . '/api/get_version_list.php';
|
||||||
if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
|
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'];
|
$version = $pem_versions[0]['name'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class updates
|
|||||||
$url = PEM_URL . '/api/get_version_list.php';
|
$url = PEM_URL . '/api/get_version_list.php';
|
||||||
if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
|
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'];
|
$version = $pem_versions[0]['name'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user