Module:Article history/config: Difference between revisions

Content deleted Content added
handle bad statuses using the existing architecture and add the status notice bar icons
get the currentstatus parameter name from the config rather than hard-coding it
Line 500:
aliases = {'START', 'B', 'A'},
text = function (articleHistoryObj)
local currentStatusParam = articleHistoryObj.cfg.currentStatusParam
articleHistoryObj:raiseError(
string.format(
"Please do not use %s as a ''currentstatus%s'' parameter: " ..
'these assessments are the responsibility of individual WikiProjects.',
tostring(articleHistoryObj.args.currentstatus)[currentStatusParam],
currentStatusParam
),
'Template:Article history#Errors'
Line 516 ⟶ 518:
-- arguments, and the ID is the value contained in the config.
local statuses = articleHistoryObj.cfg.statuses
local statusCode = articleHistoryObj.args[articleHistoryObj.currentstatuscfg.currentStatusParam]
local statusId = articleHistoryObj:getStatusIdForCode(statusCode)