Anonymous user
Module:Namespace detect/data: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Undid revision 601018314 by Mr. Stradivarius (talk) looks like that broke something
(avoid using local variables to save table lookups per Jackmcbarn's suggestion, and because this will be cached with mw.loadData so performance of this function is not such a worry) |
(Undid revision 601018314 by Mr. Stradivarius (talk) looks like that broke something) |
||
Line 52:
-- }
--]]
local ustringLower = mw.ustring.lower
local tinsert = table.insert
local clone = mw.clone
local mappings = {}
for nsid, ns in pairs(subjectNamespaces) do
▲ mappings['talk'] = mw.clone(argKeys.talk)
▲ for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = ustringLower(ns.name)
local canonicalName = ustringLower(ns.canonicalName)
mappings[nsname] = {
if canonicalName ~= nsname then
end
for _, alias in ipairs(ns.aliases) do
end
end
|