Module:Protection banner:修订间差异
小 导入1个版本 |
小 导入1个版本 |
||
| (未显示另一用户的1个中间版本) | |||
| 第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]) | 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' | ||
| 第787行: | 第795行: | ||
function Padlock:__tostring() | function Padlock:__tostring() | ||
local frame = mw.getCurrentFrame() | local frame = mw.getCurrentFrame() | ||
-- The nowiki tag helps prevent whitespace at the top of articles. | -- The nowiki tag helps prevent whitespace at the top of articles. | ||