Skip to content

Commit

Permalink
Merge pull request tatuylonen#106 from xxyzz/canonical
Browse files Browse the repository at this point in the history
Pass namespace canonical name to Lua class `Namespace`
  • Loading branch information
xxyzz authored Sep 15, 2023
2 parents 941a6a3 + f71509b commit 83cd656
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wikitextprocessor/lua/mw_site.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Namespace.__index = Namespace
function Namespace:new(obj)
obj = obj or {}
setmetatable(obj, self)
obj.canonicalName = obj.name
obj.canonicalName = obj.canonical
obj.displayName = obj.name
obj.hasSubpages = obj.name == "Main" or obj.name == NAMESPACE_DATA.Module.name
return obj
Expand All @@ -41,7 +41,8 @@ for ns_canonical_name in pairs(NAMESPACE_DATA) do
isSubject=ns_data.issubject,
isContent=ns_data.content,
isTalk=ns_data.istalk,
aliases=ns_data.aliases
aliases=ns_data.aliases,
canonical=ns_canonical_name,
}
mw_site_namespaces[ns_data.id] = ns
mw_site_namespaces[ns_data.name] = ns
Expand Down

0 comments on commit 83cd656

Please sign in to comment.