mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12536] Use stable values when unstable are unavailable
PHPBB3-12536
This commit is contained in:
parent
8b6df0e2f8
commit
e1d9f1c67c
1 changed files with 5 additions and 11 deletions
|
@ -215,19 +215,10 @@ class version_helper
|
|||
|
||||
if ($this->force_stability !== null)
|
||||
{
|
||||
$stability = ($this->force_stability === 'unstable') ? 'unstable' : 'stable';
|
||||
}
|
||||
else
|
||||
{
|
||||
$stability = $this->is_stable($this->current_version) ? 'stable' : 'unstable';
|
||||
return ($this->force_stability === 'unstable') ? $info['unstable'] : $info['stable'];
|
||||
}
|
||||
|
||||
if (!isset($info[$stability]))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
return $info[$stability];
|
||||
return ($this->is_stable($this->current_version)) ? $info['stable'] : $info['unstable'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -271,6 +262,9 @@ class version_helper
|
|||
}
|
||||
}
|
||||
|
||||
$info['stable'] = (empty($info['stable'])) ? array() : $info['stable'];
|
||||
$info['unstable'] = (empty($info['unstable'])) ? $info['stable'] : $info['unstable'];
|
||||
|
||||
$this->cache->put($cache_file, $info, 86400); // 24 hours
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue