Shows Versioninfo of CURRENT Version instead of newest

This commit is contained in:
int2001 2023-12-15 11:54:26 +00:00
parent 065c2f96f9
commit a7412331c2
No known key found for this signature in database
GPG Key ID: DFB1C13CD2DB037B

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);
@ -73,4 +79,4 @@
</div>
</div>
</div>
</div>
</div>