Module:Article history/config: Difference between revisions

Content deleted Content added
add error help locations and improve a couple of the messages
pass articleHistoryObj through to validateDate
Line 64:
end
 
local function validateDate(key, date, articleHistoryObj)
local longDate = getLongDate(date)
if longDate then
Line 108:
do
local key = prefix .. 'date'
t.date = validateDate(key, args[key], articleHistoryObj)
end
for _, suffix in ipairs(suffixes) do
Line 121:
local oldKey = prefix .. 'date2'
local newKey = prefix .. '2date'
t.date = validateDate(oldKey, args[oldKey], articleHistoryObj)
table.insert(oldKeys, "'" .. oldKey .. "'")
table.insert(newKeys, "'" .. newKey .. "'")
Line 147:
do
local key = prefix .. tostring(prefixData[1]) .. 'date'
t.date = validateDate(key, args[key], articleHistoryObj)
end
for i, suffix in ipairs(suffixes) do