Module:Protection banner: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(convert categories back to a flat table scheme) |
(add namespace parser) |
||
Line 43:
['pc-autoconfirmed-all-all-all'] = 'Wikipedia pending changes protected pages (level 1)',
['pc-reviewer-all-all-all'] = 'Wikipedia pending changes protected pages (level 2)',
}
[2] = 'user',
[3] = 'user',
[4] = 'project',
[6] = 'file',
[10] = 'template',
[12] = 'project',
[14] = 'category',
[100] = 'portal',
}
Line 95 ⟶ 106:
end
function p.parseNamespace(ns)
function p.matchCategory(cats, protType, protLevel, namespace, expiry, reason)▼
-- The ns variable is the namespace number.
if not ns or type(ns) ~= 'number' then
end▼
▲ return true
end
local nskey = nskeys[ns]
if not nskey and ns % 2 == 1 then
nskey = 'talk'
▲ local sortCats = {}
else
nskey = 'all'
end
▲function p.matchCategory(cats, protType, protLevel, namespace, expiry, reason)
▲ local ns1 = t1.namespace
end
|