Modul:Protection banner: Unterschied zwischen den Versionen
don't keep the whole export table around when we only need one thing from it
(fix method name) |
(don't keep the whole export table around when we only need one thing from it) |
||
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 | local newFileLink = require('Module:File link').new | ||
local | local effectiveProtectionLevel = require('Module:Effective protection level')._main | ||
local yesno = require('Module:Yesno') | local yesno = require('Module:Yesno') | ||
Zeile 105: | Zeile 105: | ||
-- Set level | -- Set level | ||
do | do | ||
local level = | local level = effectiveProtectionLevel(self._action, titleObj) | ||
if level == 'accountcreator' then | if level == 'accountcreator' then | ||
-- Lump titleblacklisted pages in with template-protected pages, | -- Lump titleblacklisted pages in with template-protected pages, | ||
Zeile 635: | Zeile 635: | ||
or self._configObj:getMessage('image-filename-default') | or self._configObj:getMessage('image-filename-default') | ||
or 'Transparent.gif' | or 'Transparent.gif' | ||
return | return newFileLink(filename) | ||
:width(self._imageWidth or 20) | :width(self._imageWidth or 20) | ||
:alt(self._imageAlt) | :alt(self._imageAlt) |