Modul:Protection banner: Unterschied zwischen den Versionen
lazily initialise modules we don't always need
(allow individual banner config items to fall back to the same value in the defaults table, and add functions for making the blurb values) |
(lazily initialise modules we don't always need) |
||
Zeile 5: | Zeile 5: | ||
require('Module:No globals') | require('Module:No globals') | ||
local class = require('Module:Middleclass').class | local class = require('Module:Middleclass').class | ||
local mFileLink = require('Module:File link') | local mFileLink = require('Module:File link') | ||
local mProtectionLevel = require('Module:Effective protection level') | local mProtectionLevel = require('Module:Effective protection level') | ||
local yesno = require('Module:Yesno') | local yesno = require('Module:Yesno') | ||
-- Lazily initialise modules we don't always need. | |||
local mArguments, mMessageBox | |||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
Zeile 792: | Zeile 794: | ||
function ProtectionBanner.exportToWiki(frame, title) | function ProtectionBanner.exportToWiki(frame, title) | ||
mArguments = mArguments or require('Module:Arguments') | |||
local args = mArguments.getArgs(frame) | local args = mArguments.getArgs(frame) | ||
return ProtectionBanner.exportToLua(args, title) | return ProtectionBanner.exportToLua(args, title) |