Anonymous user
Module:Protection banner: Difference between revisions
change BannerTemplate:setImageFilename to accept protection objects and title objects rather than individual parameters
Enwikipedia>Mr. Stradivarius (allow category suppression with category=no) |
Enwikipedia>Mr. Stradivarius (change BannerTemplate:setImageFilename to accept protection objects and title objects rather than individual parameters) |
||
Line 566:
end
function BannerTemplate:setImageFilename(filename,
if filename then
self._imageFilename = filename
return nil
end
local action = protectionStatusObj:getAction()
local level = protectionStatusObj:getAction()
local expiry = protectionStatusObj:getExpiry()
-- Deal with special cases first.
if (namespace == 10 or namespace == 828) -- Maybe we don't need the namespace check?
Line 1,014 ⟶ 1,012:
-- Set the image fields
local bannerConfig = configObj:getBannerConfig(protectionObj)
▲ titleObj.namespace,
if isPadlock then
bannerObj:setImageTooltip(blurbObj:makeTooltipText())
|