Jump to content

Module:Protection banner: Difference between revisions

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)
Line 5: Line 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')


Line 105: Line 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,
Line 635: Line 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)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.