Content deleted Content added
add an error for invalid current statuses |
control for when getData returns nil |
||
Line 609:
end,
makeData = function (articleHistoryObj)
mw.log('Hi!')
local args = articleHistoryObj.args
local prefixArgs = articleHistoryObj.prefixArgs
Line 670 ⟶ 671:
icon = function (articleHistoryObj, noticeObj)
local data = noticeObj:getData(articleHistoryObj)
if not data then
return nil
end
if data.isInFeaturedTopic then
return 'Cscr-featuredtopic.svg'
Line 678 ⟶ 682:
iconCaption = function (articleHistoryObj, noticeObj)
local data = noticeObj:getData(articleHistoryObj)
if not data then
return nil
end
if data.isInFeaturedTopic then
return 'Featured topic star'
Line 688 ⟶ 695:
text = function (articleHistoryObj, noticeObj)
local data = noticeObj:getData(articleHistoryObj)
if not data then
return nil
end
local article = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
Line 773 ⟶ 783:
categories = function (articleHistoryObj, noticeObj)
local data = noticeObj:getData(articleHistoryObj)
if not data then
return nil
end
local status = articleHistoryObj:getStatusId()
local article = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
Line 881 ⟶ 894:
text = function (articleHistoryObj, noticeObj)
local data = noticeObj:getData(articleHistoryObj)
if not data or data.categoryOnly then
return nil
end
Line 906 ⟶ 919:
categories = function (articleHistoryObj, noticeObj)
local data = noticeObj:getData(articleHistoryObj)
if not data then
return nil
end
local cats = {}
if data.categoryOnly then
Line 1,690 ⟶ 1,706:
text = function (articleHistoryObj, collapsibleNoticeObj)
local data = collapsibleNoticeObj:getData(articleHistoryObj)
if not data then
return nil
end
local raPage = 'Wikipedia:Recent additions/'
.. getDate('Y/F#j F Y', data[1].date)
Line 1,709 ⟶ 1,728:
collapsibleText = function (articleHistoryObj, collapsibleNoticeObj)
local data = collapsibleNoticeObj:getData(articleHistoryObj)
if not data then
return nil
end
local ctext = {}
if #data == 1 and data[1].entry then
Line 1,780 ⟶ 1,802:
text = function (articleHistoryObj, collapsibleNoticeObj)
local data = collapsibleNoticeObj:getData(articleHistoryObj)
if not data then
return nil
end
local intro
if #data > 1 then
Line 1,809 ⟶ 1,834:
text = function (articleHistoryObj, collapsibleNoticeObj)
local data = collapsibleNoticeObj:getData(articleHistoryObj)
if not data then
return nil
end
local intro
if #data > 1 then
|