Merged revision(s) 27156 from trunk:
*Fatal error*: Call to undefined method plugins::plugin_version_compare replaced by safe_version_compare caused by r26999 git-svn-id: http://piwigo.org/svn/branches/2.6@27157 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
7de2f7cf73
commit
d98c591234
2 changed files with 3 additions and 10 deletions
|
@ -178,7 +178,7 @@ class updates
|
|||
{
|
||||
$ext_info = $server_ext[$fs_ext['extension']];
|
||||
|
||||
if (!$this->version_compare($fs_ext['version'], $ext_info['revision_name'], $type))
|
||||
if (!safe_version_compare($fs_ext['version'], $ext_info['revision_name'], '>='))
|
||||
{
|
||||
if (in_array($ext_id, $conf['updates_ignored'][$type]))
|
||||
{
|
||||
|
@ -207,7 +207,7 @@ class updates
|
|||
foreach($this->$type->$fs as $ext_id => $fs_ext)
|
||||
{
|
||||
if (isset($_SESSION['extensions_need_update'][$type][$ext_id])
|
||||
and $this->version_compare($fs_ext['version'], $_SESSION['extensions_need_update'][$type][$ext_id], $type))
|
||||
and safe_version_compare($fs_ext['version'], $_SESSION['extensions_need_update'][$type][$ext_id], '>='))
|
||||
{
|
||||
// Extension have been upgraded
|
||||
$this->check_extensions();
|
||||
|
@ -256,13 +256,6 @@ class updates
|
|||
}
|
||||
}
|
||||
|
||||
function version_compare($a, $b, $type)
|
||||
{
|
||||
$version_compare = rtrim($type, 's').'_version_compare';
|
||||
|
||||
return $this->$type->$version_compare($a, $b);
|
||||
}
|
||||
|
||||
static function process_obsolete_list($file)
|
||||
{
|
||||
if (file_exists(PHPWG_ROOT_PATH.$file)
|
||||
|
|
|
@ -59,7 +59,7 @@ foreach ($autoupdate->types as $type)
|
|||
|
||||
$ext_info = $server_ext[$fs_ext['extension']];
|
||||
|
||||
if (!$autoupdate->version_compare($fs_ext['version'], $ext_info['revision_name'], $type))
|
||||
if (!safe_version_compare($fs_ext['version'], $ext_info['revision_name'], '>='))
|
||||
{
|
||||
$template->append('update_'.$type, array(
|
||||
'ID' => $ext_info['extension_id'],
|
||||
|
|
Loading…
Reference in a new issue