|
|
Line 11: |
Line 11: |
| else | | else |
| title = mw.title.getCurrentTitle() | | title = mw.title.getCurrentTitle() |
| end
| |
| pagename = title.prefixedText
| |
| if action == 'autoreview' then
| |
| local level = mw.ext.FlaggedRevs.getStabilitySettings(title)
| |
| level = level and level.autoreview
| |
| if level == 'review' then
| |
| return 'reviewer'
| |
| elseif level ~= '' then
| |
| return level
| |
| else
| |
| return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review
| |
| end
| |
| elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then
| |
| error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 )
| |
| end | | end |
| if title.namespace == 8 then -- MediaWiki namespace | | if title.namespace == 8 then -- MediaWiki namespace |