Changes
Module:Uses TemplateStyles (view source)
Revision as of 17:09, 4 September 2019
, 17:09, 4 September 2019Padlocks will never be added to TemplateStyles pages. They work only on wikitext pages.
boxArgs.text = 'This ' ..
boxArgs.text = 'This ' ..
(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..
(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..
' uses [[Wikipedia:TemplateStyles|TemplateStyles]]:\n' .. tStylesList
' uses [[mw:Help:TemplateStyles|TemplateStyles]]:\n' .. tStylesList
end
end
boxArgs.type = 'notice'
boxArgs.type = 'notice'
local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil
local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil
local addedLevelCat = false
local addedLevelCat = false
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)
if tsProt ~= currentProt and not addedLevelCat then
if tsProt ~= currentProt and not addedLevelCat then
cats[#cats + 1] = "Templates using TemplateStyles with a different protection level"
cats[#cats + 1] = "Templates using TemplateStyles with a different protection level"
end
end
end
end