Difference between revisions of "Module:Sandbox/Ahecht/sandbox"

From blackwiki
Jump to navigation Jump to search
blackwiki>Ahecht
(test)
blackwiki>Ahecht
(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)
args = frame.args
+
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 = _main(args)
+
return output
output = '{'
 
comma = ''
 
for k, v in pairs(args) do
 
output = output .. comma .. k .. '=' .. v .. ' (args[' .. k .. ']='.. args[k] .. ')'
 
comma = ', '
 
end
 
return output .. '}'
 
 
end
 
end
  
 
return p
 
return p

Revision as of 15:15, 27 July 2017

Documentation for this module may be created at Module:Sandbox/Ahecht/sandbox/doc

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