Jump to content

Module:Protection banner: Difference between revisions

try fairly ugly hack for office protection
(make indef blp categories work for 'all' as well as 'indef')
(try fairly ugly hack for office protection)
Line 143: Line 143:
{true, true, true, true, true},    -- 1
{true, true, true, true, true},    -- 1
{true, true, true, true, false},    -- 2
{true, true, true, true, false},    -- 2
{true, true, true, false, true},    -- 3
{true, true, false, true, true},    -- 3
{true, true, false, true, true},    -- 4
{true, true, true, false, true},    -- 4
{true, true, true, false, false},  -- 5
{true, true, false, true, false},  -- 5
{true, true, false, true, false},  -- 6
{true, true, true, false, false},  -- 6
{true, true, false, false, true},  -- 7
{true, true, false, false, true},  -- 7
{true, true, false, false, false},  -- 8
{true, true, false, false, false},  -- 8
Line 153: Line 153:
{false, false, false, false, false} -- 11
{false, false, false, false, false} -- 11
}
}
if reason ~= 'vandalism' then
attemptOrder[3], attemptOrder[4] = attemptOrder[4], attemptOrder[3]
local reasonFirst = {
vandalism = true,
office = true
}
if reasonFirst[reason] then
attemptOrder[3], attemptOrder[4] = attemptOrder[4], attemptOrder[3]  
attemptOrder[5], attemptOrder[6] = attemptOrder[6], attemptOrder[5]
attemptOrder[5], attemptOrder[6] = attemptOrder[6], attemptOrder[5]
table.insert(attemptOrder, 2, {false, false, false, true, false}) -- To deal with office-protection
end
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.