Module:Protected edit request/active: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
reflect new calling conventions of Module:Effective protection level
Jackmcbarn (talk | contribs)
put the urn link inside the message box table to avoid a confused parsoid
Line 503:
self:setArg('smallimage', smallPadlock)
self:setArg('image', largePadlock)
end
 
function box:exportUrnLinksbuildUrnLinks()
local ret = {}
local boxProtectionLevel = self.boxProtectionLevel
for titleObj in self.titles:titleIterator() do
table.insert(ret, titleObj:makeUrnLink(boxProtectionLevel))
end
return mw.ustring.format('<span class="plainlinks" style="display:none">%s</span>', table.concat(ret))
end
 
function box:setBlurbText()
local blurbText =self:setArg('text', self.blurb:export() .. self:buildUrnLinks())
self:setArg('text', blurbText)
end
 
Line 534 ⟶ 542:
end
return table.concat(cats)
end
 
function box:exportUrnLinks()
local ret = {}
local boxProtectionLevel = self.boxProtectionLevel
for titleObj in self.titles:titleIterator() do
table.insert(ret, titleObj:makeUrnLink(boxProtectionLevel))
end
return mw.ustring.format('<span class="plainlinks" style="display:none">%s</span>', table.concat(ret))
end
 
Line 551 ⟶ 550:
local ret = {}
table.insert(ret, self:exportRequestTmbox())
table.insert(ret, self:exportUrnLinks())
if not self.demo then
table.insert(ret, self:exportRequestCategories())