Anonymous user
Module:Protection banner: Difference between revisions
export classes for testing purposes and a few other tweaks
Enwikipedia>Jackmcbarn (add no globals now, to catch any problems sooner rather than later) |
Enwikipedia>Mr. Stradivarius (export classes for testing purposes and a few other tweaks) |
||
Line 88:
function Config:getConfigTable(key)
local
}
if
return self._cfg[key]
else
Line 187 ⟶ 184:
local ProtectionBanner = {}
function ProtectionBanner.
if yesno(args.small) then▼
else▼
end▼
end▼
function ProtectionBanner.exportToWiki(frame, titleObj)▼
local args = mArguments.getArgs(frame)
return ProtectionBanner.exportToLua(args,
end
function ProtectionBanner.exportToLua(args, title)
title = title or mw.title.getCurrentTitle()
local pstatus = ProtectionStatus.new(args, title)
local cfg = Config:new()
-- Get the banner template object
local banner
do
local bannerClass
bannerClass = Padlock
bannerClass = Banner
end
banner = bannerClass:new()
▲ end
▲end
return {
ProtectionStatus = ProtectionStatus,
Config = Config,
Image = Image,
Blurb = Blurb,
BannerTemplate = BannerTemplate,
Banner = Banner,
Padlock = Padlock,
Category = Category,
ProtectionCategory = ProtectionCategory,
ErrorCategory = ErrorCategory,
ExpiryCategory = ExpiryCategory
}
end
|