Jump to content

Module:Sandbox/Ahecht/sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
test
test
Line 2: Line 2:


local function _main(args)
local function _main(args)
for k, v in pairs(args) do
args[k] = "X"
end
return true
return true
end
end


function p.main(frame)
function p.main(frame)
local output = '*Version: ' .. mw.site.currentVersion[edit] .. '\n*$wgScriptPath: ' .. mw.site.scriptPath() .. '\n*$wgServer: ' .. mw.site.server() .. '\n*$wgSitename: ' .. mw.site.siteName() .. '\n*$wgStylePath: ' .. mw.site.stylePath()
args = frame.args
return output
_args = _main(args)
output = '{'
comma = ''
for k, v in pairs(args) do
output = output .. comma .. k .. '=' .. v .. ' (args[' .. k .. ']='.. args[k] .. ')'
comma = ', '
end
return output .. '}'
end
end



Revision as of 15:15, 27 July 2017

local p = {}

local function _main(args)
	return true
end

function p.main(frame)
	local output = '*Version: ' .. mw.site.currentVersion[edit] .. '\n*$wgScriptPath: ' .. mw.site.scriptPath() .. '\n*$wgServer: ' .. mw.site.server() .. '\n*$wgSitename: ' .. mw.site.siteName() .. '\n*$wgStylePath: ' .. mw.site.stylePath()
	return output
end

return p