Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Protection banner: Difference between revisions

Content added Content deleted
(add a Protection:isTemporary method)
(use isDemo instead of args.category and use an isSmall variable while we're at it)
Line 812: Line 812:


local ret = {}
local ret = {}
local isDemo = yesno(args.demo)
local isSmall = yesno(args.small)


-- Render the banner
-- Render the banner
if protectionObj:isProtected() then
if protectionObj:isProtected() or isDemo then
ret[#ret + 1] = tostring(
ret[#ret + 1] = tostring(
(yesno(args.small) and Padlock or Banner)
(isSmall and Padlock or Banner)
:new(protectionObj, blurbObj, cfg)
:new(protectionObj, blurbObj, cfg)
)
)
Line 822: Line 824:
-- Render the categories
-- Render the categories
if yesno(args.category) ~= false then
if not isDemo then
ret[#ret + 1] = protectionObj:makeCategoryLinks()
ret[#ret + 1] = protectionObj:makeCategoryLinks()
end
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.