Module:Article history/config: Difference between revisions

Content deleted Content added
add tracking category for Wikipedia:Deletion to Quality Award
make the Deletion to Quality Award testing more sophisticated
Line 2,006:
local status = articleHistoryObj:getStatusId()
if status == 'FA' or status == 'FL' or status == 'GA' then
local iAfd = 0
local hasAfd = false
forlocal i,actionObjects obj= in ipairs(articleHistoryObj:getActionObjects()) do
for i, obj in ipairs(actionObjects) do
if obj.id == 'AFD' then
iAfd = i
hasAfd = true
break
Line 2,014 ⟶ 2,017:
end
if hasAfd then
local function hasNomination(id, result)
ret[#ret + 1] = Category.new('Deletion to Quality Award candidates')
for i = iAfd + 1, #actionObjects do
local obj = actionObjects[i]
if obj.id == id and obj:getResult() == result then
return true
end
end
return false
end
if status == 'GA' and hasNomination('GAN', 'listed') or
status == 'FL' and hasNomination('FLC', 'promoted') or
status == 'FA' and hasNomination('FAC', 'promoted')
then
ret[#ret + 1] = Category.new('Deletion to Quality Award candidates')
end
end
end