کاربر ناشناس
بدون خلاصۀ ویرایش
Pourrezaei (بحث | مشارکتها) (صفحهای تازه حاوی «local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is spe...» ایجاد کرد) |
imported>علیرضا بدون خلاصۀ ویرایش |
||
خط ۱۴: | خط ۱۴: | ||
pagename = title.prefixedText | pagename = title.prefixedText | ||
if action == 'autoreview' then | if action == 'autoreview' then | ||
return 'unknown' | 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( 'نخستین پارامتر باید یکی از edit، move، create، upload، autoreview باشد', 2 ) | ||
end | end | ||
local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) | local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) | ||
خط ۳۳: | خط ۳۴: | ||
) | ) | ||
else | else | ||
error(' | error('خطای درونی در پودمان:Effective protection expiry؛ برچسب زمان انقضای ناهنجار') | ||
end | end | ||
end | end |