Module:Sandbox/Ahecht/sandbox: Difference between revisions

Content deleted Content added
test
simplify
 
(7 intermediate revisions by the same user not shown)
Line 6:
 
function p.main(frame)
local mwSite = ''
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()
for k,v in pairs(mw.site) do
return output
mwSite = mwSite .. '\n*mw.site.' .. k .. ': '
if type(v) == 'string' or type(v) == 'number' then
mwSite = mwSite .. v
elseif type(v) == 'table' then
for kk,vv in pairs(v) do if type(vv) == 'string' or type(vv) == 'number' then mwSite = mwSite .. '\n**mw.site.' .. k .. '.' .. kk .. ': ' .. vv end end
end
end
return outputmwSite
end