Module:Effective protection expiry:修订间差异
zhwiki>Xiplus-abot 小 已更改“Module:Effective protection expiry”的保护设置:高風險模板:5032引用<!-- 機器人3 -->([编辑=仅允许模板编辑员](无限期)[移动=仅允许模板编辑员](无限期)) |
IdleTap-bot(留言 | 贡献) 导入自求闻百科 |
||
| 第14行: | 第14行: | ||
pagename = title.prefixedText | pagename = title.prefixedText | ||
if action == 'autoreview' then | if action == 'autoreview' then | ||
return 'unknown' | |||
return | |||
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' then | ||
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) | error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) | ||
| 第25行: | 第24行: | ||
return 'unknown' | return 'unknown' | ||
else | else | ||
local year, month, | local year = mw.ustring.sub( rawExpiry, 1, 4 ) | ||
local month = mw.ustring.sub( rawExpiry, 5, 6 ) | |||
) | local day = mw.ustring.sub( rawExpiry, 7, 8 ) | ||
return year .. '-' .. month .. '-' .. day | |||
end | end | ||
end | end | ||