mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12536] Get Versions Should Not Require Both Stable and Unstable
https://tracker.phpbb.com/browse/PHPBB3-12536 PHPBB3-12536
This commit is contained in:
parent
b62c39c36e
commit
36d5fff1c6
1 changed files with 12 additions and 3 deletions
|
@ -216,10 +216,19 @@ class version_helper
|
||||||
|
|
||||||
if ($this->force_stability !== null)
|
if ($this->force_stability !== null)
|
||||||
{
|
{
|
||||||
return ($this->force_stability === 'unstable') ? $info['unstable'] : $info['stable'];
|
$stability = ($this->force_stability === 'unstable') ? 'unstable' : 'stable';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stability = $this->is_stable($this->current_version) ? 'stable' : 'unstable';
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($this->is_stable($this->current_version)) ? $info['stable'] : $info['unstable'];
|
if (!isset($info[$stability]))
|
||||||
|
{
|
||||||
|
throw new \RuntimeException($this->user->lang('VERSIONCHECK_FAIL'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $info[$stability];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -247,7 +256,7 @@ class version_helper
|
||||||
|
|
||||||
$info = json_decode($info, true);
|
$info = json_decode($info, true);
|
||||||
|
|
||||||
if (empty($info['stable']) || empty($info['unstable']))
|
if (empty($info['stable']) && empty($info['unstable']))
|
||||||
{
|
{
|
||||||
$this->user->add_lang('acp/common');
|
$this->user->add_lang('acp/common');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue