Module:Effective protection level:修订间差异

IdleTap-bot​(留言 | 贡献)
导入自求闻百科
IdleTap-bot​(留言 | 贡献)
兼容未安装 TitleBlacklist 扩展:加 mw.ext.TitleBlacklist 存在性守卫(由IdleTap-bot导入维护)
 
第44行: 第44行:
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.
local blacklistentry = (mw.ext and mw.ext.TitleBlacklist) and 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 'officialprotected'
return 'officialprotected'
第53行: 第53行:
end
end
end
end
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
local blacklistentry = (mw.ext and mw.ext.TitleBlacklist) and mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
if blacklistentry then
if not blacklistentry.params.autoconfirmed then
if not blacklistentry.params.autoconfirmed then