Zum Inhalt springen

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 mFileLink = require('Module:File link')
local newFileLink = require('Module:File link').new
local mProtectionLevel = require('Module:Effective protection level')
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 = mProtectionLevel._main(self._action, titleObj)
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 mFileLink.new(filename)
return newFileLink(filename)
:width(self._imageWidth or 20)
:width(self._imageWidth or 20)
:alt(self._imageAlt)
:alt(self._imageAlt)
Anonymer Benutzer