From a7412331c28772e8462077d84432b3dca4606e9f Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 15 Dec 2023 11:54:26 +0000 Subject: [PATCH] Shows Versioninfo of CURRENT Version instead of newest --- application/views/version_dialog/index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/views/version_dialog/index.php b/application/views/version_dialog/index.php index 644a0508..81939391 100644 --- a/application/views/version_dialog/index.php +++ b/application/views/version_dialog/index.php @@ -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 @@ - \ No newline at end of file +