271
回編集
mediawiki>ネイ 細 (「モジュール:Effective protection level」を保護しました: 影響が特に大きいテンプレート: 使用数9,300 ([編集=拡張承認された利用者と管理者に許可] (無期限) [移動=拡張承認された利用者と管理者に許可] (無期限))) |
細 (1版 をインポートしました) |
||
24行目: | 24行目: | ||
end | end | ||
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then | elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then | ||
error( ' | 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 | ||
40行目: | 40行目: | ||
end | end | ||
if action == 'undelete' then | if action == 'undelete' then | ||
return | return 'sysop' | ||
end | end | ||
local level = title.protectionLevels[action] and title.protectionLevels[action][1] | local level = title.protectionLevels[action] and title.protectionLevels[action][1] | ||
54行目: | 54行目: | ||
return 'templateeditor' | return 'templateeditor' | ||
elseif title.namespace == 6 then | elseif title.namespace == 6 then | ||
return | return 'filemover' | ||
elseif level == 'extendedconfirmed' then | elseif level == 'extendedconfirmed' then | ||
return 'extendedconfirmed' | return 'extendedconfirmed' | ||
64行目: | 64行目: | ||
if blacklistentry then | if blacklistentry then | ||
if not blacklistentry.params.autoconfirmed then | if not blacklistentry.params.autoconfirmed then | ||
return | return 'templateeditor' | ||
elseif level == 'extendedconfirmed' then | elseif level == 'extendedconfirmed' then | ||
return 'extendedconfirmed' | return 'extendedconfirmed' | ||
76行目: | 76行目: | ||
elseif action == 'upload' then | elseif action == 'upload' then | ||
return 'autoconfirmed' | return 'autoconfirmed' | ||
elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts | |||
return 'user' | |||
else | else | ||
return '*' | return '*' |