From b3488e2715e1227a0acd07ede751b7f8b0d0ec1f Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 31 May 2026 10:23:20 -0500 Subject: [PATCH] fix(updates): correct dlid prefix and align XML with Joomla standard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix downloadkey prefix: "&dlid=" → "dlid=" (Joomla handles the separator) - Reorder XML fields to match Akeeba/Joomla convention - Add sha512 and php_minimum optional fields to update XML struct Co-Authored-By: Claude Opus 4.6 (1M context) --- services/updateserver/joomla.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/services/updateserver/joomla.go b/services/updateserver/joomla.go index 28ae7236c9..2d27bb93ae 100644 --- a/services/updateserver/joomla.go +++ b/services/updateserver/joomla.go @@ -10,10 +10,10 @@ import ( "strings" "time" - "git.mokoconsulting.tech/MokoConsulting/MokoGitea/models/db" - "git.mokoconsulting.tech/MokoConsulting/MokoGitea/models/licenses" - repo_model "git.mokoconsulting.tech/MokoConsulting/MokoGitea/models/repo" - "git.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/setting" + "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/db" + "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/licenses" + repo_model "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/repo" + "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/setting" ) // Joomla-compatible updates.xml structures for XML marshaling. @@ -25,20 +25,22 @@ type xmlUpdates struct { type xmlUpdate struct { Name string `xml:"name"` - Description string `xml:"description"` Element string `xml:"element"` Type string `xml:"type"` - Client string `xml:"client"` Version string `xml:"version"` - CreationDate string `xml:"creationDate"` InfoURL xmlInfoURL `xml:"infourl"` Downloads xmlDownloads `xml:"downloads"` - SHA256 string `xml:"sha256,omitempty"` Tags xmlTags `xml:"tags"` + TargetPlatform xmlTargetPlat `xml:"targetplatform"` + SHA256 string `xml:"sha256,omitempty"` + SHA512 string `xml:"sha512,omitempty"` + Client string `xml:"client"` + PHPMinimum string `xml:"php_minimum,omitempty"` + Description string `xml:"description,omitempty"` + CreationDate string `xml:"creationDate,omitempty"` ChangelogURL string `xml:"changelogurl,omitempty"` Maintainer string `xml:"maintainer,omitempty"` MaintainerURL string `xml:"maintainerurl,omitempty"` - TargetPlatform xmlTargetPlat `xml:"targetplatform"` DownloadKey *xmlDownloadKey `xml:"downloadkey,omitempty"` } @@ -241,7 +243,7 @@ func GenerateJoomlaXML(ctx context.Context, repo *repo_model.Repository, require } if requireKey { - u.DownloadKey = &xmlDownloadKey{Prefix: "&dlid=", Suffix: ""} + u.DownloadKey = &xmlDownloadKey{Prefix: "dlid=", Suffix: ""} } updates.Updates = append(updates.Updates, u) -- 2.52.0