Modifications

Sauter à la navigation Sauter à la recherche

Module:Effective protection expiry

271 octets ajoutés, 13 octobre 2016 à 23:30
don't error if the page isn't under PC
pagename = title.prefixedText
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
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
return 'unknown'
else
local year , month, day, hour, minute, second = mw.ustring.subrawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)( rawExpiry, 1, 4 %d%d) local month = mw.ustring.sub( rawExpiry, 5, 6 %d%d)$' local day = mw.ustring.sub( rawExpiry, 7, 8 ) if year then return year .string. format( '%s-%s-%sT%s:%s:%s' .. , year, month .. , day, hour, minute, second ) else error('-internal error in Module:Effective protection expiry; malformed expiry timestamp' .. day) end
end
end
Utilisateur anonyme

Menu de navigation