Modulo:Criteri cancellazione immediata/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m fix |
usa id del namespace |
||
Riga 76:
-- Funzioni di utilità
-- =============================================================================
local function to_namespace_id(ns)
return ns
return mw.site.namespaces[''].id
elseif ns ~= nil and ns ~= '' and mw.site.namespaces[ns] then
return mw.site.namespaces[ns].id
end▼
local function to_criterion(key, value)
Riga 81 ⟶ 91:
for ns, props in pairs(value) do
▲ end
if ns and type(props) == 'table' then
if type(props.ordine) == 'number' then
criterion:setOrder(props.ordine, ns)
Riga 184 ⟶ 192:
end
▲ elseif args.ns == nil then
▲ args.ns = 'default'
▲ end
if args['tipo elenco'] == nil or get_list_prefix(args['tipo elenco']) == nil then
Riga 212 ⟶ 216:
local args = get_args(frame)
if args.criterio and
return get_criterion(args)
end
Riga 220 ⟶ 224:
local args = get_args(frame)
if
return list_criteria(args)
end
|