4,595
edits
imported>Fayenatic london (Update categories, see Stiles.casa Wiki:Categories for discussion/Log/2021 October 31) |
(Created page with "-- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args)...") |
||
Line 47: | Line 47: | ||
boxArgs.text = 'This module depends on the following other modules:' .. moduleList | boxArgs.text = 'This module depends on the following other modules:' .. moduleList | ||
else | else | ||
boxArgs.text = 'This template uses [[ | boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList | ||
end | end | ||
end | end | ||
Line 110: | Line 110: | ||
if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end | if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end | ||
for i, module in ipairs(modules) do | for i, module in ipairs(modules) do | ||
if module ~= " | if module ~= "WP:libraryUtil" then | ||
local moduleProt = mw.title.new(module).protectionLevels["edit"][1] | local moduleProt = mw.title.new(module).protectionLevels["edit"][1] | ||
if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end | if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end |