Anonymous user
Module:Protection banner: Difference between revisions
try a different category matching algorithm completely
Enwikipedia>Mr. Stradivarius (fix "Wikipedia protected categories" key) |
Enwikipedia>Mr. Stradivarius (try a different category matching algorithm completely) |
||
Line 136:
-- Define the key table and the order to test it in
local keyTable = {protType, protLevel, namespace, reason, expiry}
local
{true, true, true, true, true},
{true, true, true, false, true},
else▼
{true, true, true, false, false},
end▼
{true, true, false, true, false},
{true, true, false, false, true},
{true, true, false, false, false},
{true, false, false, false, false},
{false, false, false, false, false}
}
-- Try successively generic matches until we run out of key combinations
local key =
for j = 1, 5 do
key[j] = keyTable[j]
▲ if attempt then
key[j] = 'all'
▲ for i, keyTableKey in ipairs(tryOrder) do
key = table.concat(key, '-')
local attempt =
if attempt then
return attempt
|