From aaefeb7c87326267ce66026c66682a8bf53eded7 Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Mon, 16 Dec 2024 20:15:14 +0100 Subject: [PATCH] [#43505] On update use changelog from updates table but fallback to extension table Signed-off-by: Roland Dalmulder --- .../components/com_installer/src/Model/ManageModel.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_installer/src/Model/ManageModel.php b/administrator/components/com_installer/src/Model/ManageModel.php index 841a20c16d773..6adb33662a182 100644 --- a/administrator/components/com_installer/src/Model/ManageModel.php +++ b/administrator/components/com_installer/src/Model/ManageModel.php @@ -409,6 +409,7 @@ public function loadChangelog($eid, $source) ) ) ->select($db->quoteName('updates.version', 'updateVersion')) + ->select($db->quoteName('updates.changelogurl', 'updateChangelogurl')) ->from($db->quoteName('#__extensions', 'extensions')) ->join( 'LEFT', @@ -423,13 +424,17 @@ public function loadChangelog($eid, $source) $this->translate($extensions); $extension = array_shift($extensions); - if (!$extension->changelogurl) { + if ($source === 'manage' && !$extension->changelogurl) { + return ''; + } + + if ($source === 'update' && !$extension->updateChangelogurl && !$extension->changelogurl) { return ''; } $changelog = new Changelog(); $changelog->setVersion($source === 'manage' ? $extension->version : $extension->updateVersion); - $changelog->loadFromXml($extension->changelogurl); + $changelog->loadFromXml($source === 'manage' ? $extension->changelogurl : ($extension->updateChangelogurl ?: $extension->changelogurl)); // Read all the entries $entries = [