Anonymous user
Module:Protection banner: Difference between revisions
try adding an exception
Enwikipedia>Mr. Stradivarius (try a different category matching algorithm completely) |
Enwikipedia>Mr. Stradivarius (try adding an exception) |
||
Line 134:
end
-- Define the key table and the order to test it in.
-- This part is a little like playing regex golf - we have to make up a new
-- rule for every idiosyncracy that was in the old template system.
local keyTable = {protType, protLevel, namespace, reason, expiry}
local attemptOrder = {
-- type, level, ns, reason, expiry
{true, true, true, true,
{true, true, true,
{true, true,
{true, true,
{true, true,
{true, true, false,
{true, true, false, false,
{true,
{
{false, false, false, false, false} -- 10
}
if reason == 'vandalism' then
attemptOrder[3], attemptOrder[4] = attemptOrder[4], attemptOrder[3]
attemptOrder[5], attemptOrder[6] = attemptOrder[6], attemptOrder[5]
end
-- Try successively generic matches until we run out of key combinations
|