Anonymous user
Module:Namespace detect/data: Difference between revisions
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
(give the argKeys table global scope so that getParamMappings can access it without having to process the cfg table again) |
(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) |
||
Line 52:
-- }
--]]
local subjectNamespaces = mw.site.subjectNamespaces▼
local mappings = {}
mainNsName = mw.ustring.lower(mainNsName)
mappings['talk'] = clone(argKeys.talk)▼
mappings[mainNsName] = mw.clone(argKeys.main)
▲ mappings['talk'] = mw.clone(argKeys.talk)
if nsid ~= 0 then -- Exclude main namespace.
local nsname =
local canonicalName =
mappings[nsname] = {mw.ustring.lower(nsname)}
if canonicalName ~= nsname then
end
for _, alias in ipairs(ns.aliases) do
end
end
|