Module:Lua banner: Difference between revisions

m
1 revision imported
m (1 revision imported: Wikipedia)
m (1 revision imported)
 
(7 intermediate revisions by 6 users not shown)
Line 35:
moduleLinks[i] = string.format('[[:%s]]', module)
local maybeSandbox = mw.title.new(module .. '/sandbox')
if maybeSandbox and maybeSandbox.exists then
moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText)
end
Line 52:
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = '[[File:Lua-logo-nolabelLogo.svg|30px|alt=|link=]]'
return mMessageBox.main('mbox', boxArgs)
end
Line 82:
if not category then
local categories = {
['Module:String'] = 'LuaTemplates String-based templateson the String Lua module',
['Module:Math'] = 'Templates based on the Math Lua module',
['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',
['Module:Citation/CS1'] = 'Lua-Templates based citationon the Citation/CS1 Lua templatesmodule'
}
categories['Module:Citation/CS1'] = categories['Module:Citation']
category = modules[1] and categories[modules[1]]
category = category or 'Lua-based templates'
Line 111 ⟶ 110:
for i, module in ipairs(modules) do
if module ~= "WP:libraryUtil" then
local moduleProtmoduleTitle = mw.title.new(module).protectionLevels["edit"][1]
local moduleProt = moduleTitle and moduleTitle.protectionLevels["edit"][1]
if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end
if moduleProt < currentProt then
Bureaucrats, rtl-contributors, Administrators
1,619

edits