mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-21 18:11:11 +00:00
Fix incorrect view URL for games
package.id is a sanitised combination of author and basename, used to compare remote and local content. Minetest ignores `_game` when comparing game names, so package.id has `_game` removed. This meant that the wrong URL was being generated for View.
This commit is contained in:
parent
ae83edd165
commit
f948e2c585
1 changed files with 3 additions and 2 deletions
|
@ -505,8 +505,9 @@ function store.handle_submit(this, fields)
|
||||||
end
|
end
|
||||||
|
|
||||||
if fields["view_" .. i] then
|
if fields["view_" .. i] then
|
||||||
local url = ("%s/packages/%s?protocol_version=%d"):format(
|
local url = ("%s/packages/%s/%s?protocol_version=%d"):format(
|
||||||
core.settings:get("contentdb_url"), package.id, core.get_max_supp_proto())
|
core.settings:get("contentdb_url"),
|
||||||
|
package.author, package.name, core.get_max_supp_proto())
|
||||||
core.open_url(url)
|
core.open_url(url)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue