「モジュール:Effective protection level」の版間の差分

ナビゲーションに移動 検索に移動
en:Module:Effective protection level oldid=980896975 より更新(ページ復帰に対応)
(エラーメッセージの日本語化)
(en:Module:Effective protection level oldid=980896975 より更新(ページ復帰に対応))
23行目: 23行目:
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
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
end
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then
error( '第1引数にはedit、move、create、upload、autoreviewのどれかを指定してください', 2 )
error( '第1引数にはedit、move、create、upload、undelete、autoreviewのどれかを指定してください', 2 )
end
end
if title.namespace == 8 then -- MediaWiki namespace
if title.namespace == 8 then -- MediaWiki namespace
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page
if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page
return 'interfaceadmin'
return 'interfaceadmin'
else -- any non-JS/CSS MediaWiki page
else -- any non-JS/CSS MediaWiki page
38行目: 38行目:
return 'sysop'
return 'sysop'
end
end
end
if action == 'undelete' then
return 'eliminator' -- 英語版では'sysop'
end
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
匿名利用者

案内メニュー