Content deleted Content added
function box.new(protectionType, args)
-- In the inheritance system used here, an object's metatable is its class, and a class's metatable is its superclass
local obj = getmetatable(box).new(protectionType, args)
setmetatable(obj, box)
local boxProtectionLevels = {semi = 'autoconfirmed', template = 'templateeditor', full = 'sysop'}
obj.boxProtectionLevel = boxProtectionLevels[protectionType]
obj.demo = yesno(args.demo)
-- Set dependent objects.
obj.titles = titleTable.new(args)
if not yesno(args.force) and obj.titles:hasSameProperty('sameProtectionStatus', function (title) return title.protectionLevel end) and obj.titles[1].protectionLevel ~= 'unprotected' then
obj.boxProtectionLevel = obj.titles[1].protectionLevel
obj.blurb = blurb.new(obj.titles, obj.boxProtectionLevel)
▼
obj.makeMessageBox = makeMessageBox
▼
end
▲ obj.blurb = blurb.new(obj.titles, obj.boxProtectionLevel)
▲ obj.makeMessageBox = makeMessageBox
function box:setImage()