Module:Article history/config: Difference between revisions

Content deleted Content added
turn this page into one big table, and add parameters and messages sections
use an articleHistory object instead of an action object for the current status and the current title
Line 50:
},
categories = {
function (actionObj, articleHistoryObj)
local result = actionObj:getResult()
if result == 'demoted' or result == 'merged' then
local currentStatus = actionObjarticleHistoryObj:getCurrentStatus()
local sortKey = actionObjarticleHistoryObj.titlecurrentTitle.subjectPageTitle.prefixedText
if currentStatus == 'FA' or currentStatus == 'FL' then
sortKey = '#' .. sortKey
Line 91:
},
categories = {
function (actionObj, articleHistoryObj)
if actionObj:getResult() == 'not kept' then
return 'Wikipedia former brilliant prose', actionObjarticleHistoryObj.titlecurrentTitle.text
end
end
Line 137:
},
categories = {
function (actionObj, articleHistoryObj)
local result = actionObj:getResult()
if result == 'demoted' or result == 'merged' then
local sortKey
if actionObjarticleHistoryObj:getCurrentStatus() == 'FL' then
sortKey = '#' .. actionObjarticleHistoryObj.titlecurrentTitle.subjectPageTitle.prefixedText
else
sortKey = actionObjarticleHistoryObj.titlecurrentTitle.text
end
return 'Wikipedia former featured lists', sortKey
Line 248:
},
categories = {
function (actionObj, articleHistoryObj)
if actionObj:getResult() == 'not listed' then
local currentStatus = actionObjarticleHistoryObj:getCurrentStatus()
if currentStatus ~= 'FA'
and currentStatus ~= 'GA'
and currentStatus ~= 'FFA'
then
return 'Former good article nominees', actionObjarticleHistoryObj.titlecurrentTitle.text
end
end
Line 287:
},
categories = {
function (actionObj, articleHistoryObj)
if actionObj:getResult() == 'delisted' then
local currentStatus = actionObjarticleHistoryObj:getCurrentStatus()
if currentStatus ~= 'FA'
and currentStatus ~= 'GA'
then
return 'Delisted good articles', actionObjarticleHistoryObj.titlecurrentTitle.text
end
end
Line 345:
},
WPR = {
name = function (actionObj, articleHistoryObj)
local names = {
approved = 'WikiProject approved revision',
Line 357:
results = {
approved = {
text = function(actionObj, articleHistoryObj)
if actionObj.oldid then
local url = mw.uri.fullUrl(
actionObjarticleHistoryObj.titlecurrentTitle.prefixedText,
{diff = 'cur', oldid = actionObj.oldid}
)