Modul:Uses TemplateStyles: Unterschied zwischen den Versionen
Make function of category match name -- if CSS pages used by more than one template catch on, this may need to be reverted and the category renamed
(fix) |
(Make function of category match name -- if CSS pages used by more than one template catch on, this may need to be reverted and the category renamed) |
||
| Zeile 74: | Zeile 74: | ||
end | end | ||
cats[#cats + 1] = category | cats[#cats + 1] = category | ||
local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil | local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil | ||
for i, ts in ipairs(tStyles) do | for i, ts in ipairs(tStyles) do | ||
local tsTitleObj = mw.title.new(ts) | local tsTitleObj = mw.title.new(ts) | ||
local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil | local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil | ||
if tsProt = | if tsProt ~= currentProt then | ||
cats[#cats + 1] = "Templates using TemplateStyles with a different protection level" | cats[#cats + 1] = "Templates using TemplateStyles with a different protection level" | ||
break | break | ||