Module:Tour stats: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 329: Line 329:
table.insert(joins2, key .. ' = ' .. value)
table.insert(joins2, key .. ' = ' .. value)
end
end
error(mw.dumpObject(options))


local results = cargo.query(
local results = cargo.query(
Line 376: Line 378:
local results = p._query(args)
local results = p._query(args)
local root = mw.html.create('div')
local root = mw.html.create('div')
local function dump(o)
  if type(o) == 'table' then
      local s = '{ '
      for k,v in pairs(o) do
        if type(k) ~= 'number' then k = '"'..k..'"' end
        s = s .. '['..k..'] = ' .. dump(v) .. ','
      end
      return s .. '} '
  else
      return tostring(o)
  end
end
root:tag('code'):wikitext(dump(args))


local title = 'Results'
local title = 'Results'