642
回編集
template>K-iczn (en:Module:Effective protection expiry 2016年9月23日 (金) 10:40(UTC)より) |
Triple-Zeta (トーク | 投稿記録) 細 (2版 をインポートしました) |
||
(4人の利用者による、間の6版が非表示) | |||
14行目: | 14行目: | ||
pagename = title.prefixedText | pagename = title.prefixedText | ||
if action == 'autoreview' then | if action == 'autoreview' then | ||
local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) | |||
return stabilitySettings and stabilitySettings.expiry or 'unknown' | |||
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( ' | error( '第1引数にはedit、move、create、upload、autoreviewのどれかを指定してください', 2 ) | ||
end | end | ||
local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) | local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) | ||
33行目: | 34行目: | ||
) | ) | ||
else | else | ||
error(' | error('[[モジュール:Effective protection expiry]]のエラー; 有効期限のタイムスタンプの書式が不正です') | ||
end | end | ||
end | end |