Merge pull request #2838 from int2001/version_compare

Shows Versioninfo of CURRENT Version instead of newest
This commit is contained in:
Andreas Kristiansen 2023-12-15 13:08:44 +01:00 committed by GitHub
commit 3a672c159b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,14 @@
if ($response !== false) {
$data = json_decode($response, true);
$current_version=$this->optionslib->get_option('version');
if ($data !== null && !empty($data)) {
$firstRelease = $data[0];
foreach ($data as $singledata) {
if ($singledata['name']==$current_version) {
$firstRelease = $singledata;
continue;
}
}
$releaseBody = isset($firstRelease['body']) ? $firstRelease['body'] : 'No release information available';
$htmlReleaseBody = htmlspecialchars($releaseBody);