Aller au contenu

Module:Orlodrim/ProtectionLevels

Une page de Wikipédia, l'encyclopédie libre.

 Documentation[créer] [purger]
local p = {}

function debugstring(value)
  if type(value) == 'table' then
    local s = ''
    for k, v in pairs(value) do
      s = s .. debugstring(k) .. '=' .. debugstring(v) .. ', '
    end
    return '[' .. s .. ']'
  else
    return tostring(value)
  end
end

function p.getprotection(frame)
  local page = mw.title.getCurrentTitle()
  return debugstring(page.protectionLevels)
end

return p