Zum Inhalt springen

Modul:Protection banner: Unterschied zwischen den Versionen

allow specifying a data table to config objects for testing purposes
(use lang:formatDate instead of os.date as it is easier to localise)
(allow specifying a data table to config objects for testing purposes)
Zeile 18: Zeile 18:
local Config = class('Config')
local Config = class('Config')


function Config:initialize()
function Config:initialize(data)
local data = mw.loadData('Module:Protection banner/config')
data = data or mw.loadData('Module:Protection banner/config')
self._cfg = data.cfg
self._cfg = data.cfg
self._msg = data.msg
self._msg = data.msg
Anonymer Benutzer