Difference between revisions of "Module:Effective protection level"
Module:Effective protection level (view source)
Revision as of 01:12, 7 February 2014
, 01:12, 7 February 2014enable titleblacklist checks
>Jackmcbarn (Use new protection retrieval, and prepare for when titleblacklist works here) |
>Jackmcbarn (enable titleblacklist checks) |
||
Line 28: | Line 28: | ||
return 'templateeditor' | return 'templateeditor' | ||
elseif action == 'move' then | elseif action == 'move' then | ||
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. | |||
if blacklistentry and not blacklistentry.params.autoconfirmed then | if blacklistentry and not blacklistentry.params.autoconfirmed then | ||
return 'accountcreator' | return 'accountcreator' | ||
elseif title.namespace == 6 then | |||
return 'filemover' | return 'filemover' | ||
else | else | ||
Line 37: | Line 37: | ||
end | end | ||
else | else | ||
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) | |||
if blacklistentry then | if blacklistentry then | ||
return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'accountcreator' | return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'accountcreator' | ||
elseif level then | |||
return level | return level | ||
elseif action == 'upload' then | elseif action == 'upload' then |