Moduł:Dopracować: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Nie podano opisu zmian
Nie podano opisu zmian
Linia 12:
return {
test = function(frame)
local un=require("Moduł:Dopracować").unknown(frame);
if(un~="")then return "true" end
local pf = frame:getParent()
-- scan reasons without dates
local sectionParamIndex = resources.data.sectionParamIndex
local sectionParamValue = resources.data.sectionParamValue
for i, reason_ in ipairs(pf.args) do
local object = pf:getArgument(i)
if object then
local reason = object:expand()
if reason and ((i ~= sectionParamIndex) or (reason ~= sectionParamValue)) then
if #mw.text.trim(reason) > 0 then
return "true"
end
end
-- end
end
local mapParamToReason = {}
for i, v in ipairs(resources.reasons) do
for _, a in ipairs(v.aliases) do
mapParamToReason[a] = i
end
end
-- scan well known reasons with optional date
for _, v in ipairs(resources.reasons) do
Linia 39 ⟶ 36:
local currentDate = object:expand()
if currentDate then
if(un~="")then return "true" end
if(mapParamToReason[k])then
return "true"
end
end
end