Content deleted Content added
narrow API, construct boxArgs with 3 items directly |
Matching reality rather than 2018 me's wishful thinking |
||
Line 77:
local tsTitleObj = mw.title.new(ts)
local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil
if cfg['protection_conflict_category'] and tsProt ~= currentProt and not addedLevelCat then▼
addedLevelCat = true▼
cats[#cats + 1] = cfg['protection_conflict_category']▼
end▼
if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then
local content = tsTitleObj:getContent()
Line 86 ⟶ 82:
cats[#cats + 1] = cfg['missing_padlock_category']
addedPadlockCat = true
end
▲ end
▲ if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then
currentProt = cfg['protection_hierarchy'][currentProt] or 0
tsProt = cfg['protection_hierarchy'][tsProt] or 0
if tsProt < currentProt then
▲ addedLevelCat = true
▲ cats[#cats + 1] = cfg['protection_conflict_category']
end
end
|