Changes
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
 
	
	if not action or not level then
		-- If the filename is not specified, we need the action and the level
		-- to find the image name. The namespace and the expiry are optional,
		-- however.
		return nil
	end
 
		local imageFilename = bannerConfig.image		bannerObj:setImageFilename(			imageFilenamebannerConfig.image,			protectionObj:getAction(),			protectionObj:getLevel(),			titleObj.namespace,			protectionObj:getExpiry()		)
		
		
		
		
		
		
		
	
change BannerTemplate:setImageFilename to accept protection objects and title objects rather than individual parameters
end
function BannerTemplate:setImageFilename(filename, actionprotectionStatusObj, level, namespace, expirytitleObj)
	if filename then
		self._imageFilename = filename
		return nil
	end
	local action = protectionStatusObj:getAction()
	local level = protectionStatusObj:getAction()
	local expiry = protectionStatusObj:getExpiry()
	local namespace = titleObj.namespace
	-- Deal with special cases first.
	if (namespace == 10 or namespace == 828) -- Maybe we don't need the namespace check?
		-- Set the image fields
		local bannerConfig = configObj:getBannerConfig(protectionObj)
		if isPadlock then
			bannerObj:setImageTooltip(blurbObj:makeTooltipText())