Open main menu

Changes

Module:Protection banner

517 bytes added, 07:40, 16 June 2014
add some more blurb parameter functions
self._expiry = args.expiry or 'indef'
self._section = args.section
self._protectionDate = args.date
self._username = args.user
end
function ProtectionStatus:getSection()
return self._section
end
 
function ProtectionStatus:getProtectionDate()
return self._protectionDate
end
 
function ProtectionStatus:getUsername()
return self._username
end
parameterFuncs[9] = function ()
return self:_makeDisputeLinkParameter() -- A link to the page history or the move log return self:_makeDisputeLinkParameter()
end
parameterFuncs[14] = function ()
return self:_makeSubjectPageLinksParameter() -- Adds links to edit requests and the talk page if we are on a -- subject page return self:_makeSubjectPageLinksParameter()
end
function Blurb:_makeProtectionDateParameter()
-- parameter $5
if local protectionDate = self._protectionDate _protectionStatusObj:getProtectionDate() if protectionDate then
local lang = mw.language.getContentLanguage()
local success, date = pcall(
lang,
'j F Y',
self._protectionDateprotectionDate
)
if success and date then
end
end
end
 
function Blurb:_makeVandalTemplateParameter()
local mVandalM = require('Module:Vandal-m')
local username = self._protectionStatusObj:getUsername()
username = username or self._titleObj.baseText
return mVandalM.luaMain{username}
end
Anonymous user