Module:Protection banner:修订间差异

Lhscogs​(留言 | 贡献)
小 导入1个版本
Lhscogs​(留言 | 贡献)
小 导入1个版本
 
(未显示2个用户的3个中间版本)
第3行: 第3行:


-- Initialise necessary modules.
-- Initialise necessary modules.
require('Module:No globals')
require('strict')
local makeFileLink = require('Module:File link')._main
local makeFileLink = require('Module:File link')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
第689行: 第689行:
local namespace = protectionObj.title.namespace
local namespace = protectionObj.title.namespace
local reason = protectionObj.reason
local reason = protectionObj.reason
local cascade = protectionObj.title.cascadingProtection.restrictions
-- Deal with special cases first.
-- Deal with special cases first.
if (
if
cascade.edit
and level == 'sysop'
and not protectionObj:isTemporary()
then
-- Cascade protected pages get the special green "cascade" padlock.
obj._imageFilename = obj._cfg.msg['image-filename-cascade']
elseif (
namespace == 10
namespace == 10
or namespace == 828
or namespace == 828
第780行: 第788行:
obj._imageLink = blurbObj:makeBannerText('link')
obj._imageLink = blurbObj:makeBannerText('link')
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
or ((protectionObj.action == 'edit') and (cfg.padlockIndicatorNames[protectionObj.level] .. (protectionObj.title.cascadingProtection.restrictions.edit and cfg.padlockIndicatorNames.cascade or '')))
or cfg.padlockIndicatorNames.default
or cfg.padlockIndicatorNames.default
or 'pp-default'
or 'pp-default'