"मोड्युल:Article history/config" का संशोधनहरू बिचको अन्तर

Content deleted Content added
add comments for the helper functions
redo makeTitle as titleExists, as checking title.exists is now the expensive part
पङ्क्ति ६४:
end
 
-- Returns true if the given page is an existing title, and false or nil
-- Wrapper function for mw.title.new.
-- otherwise
local function makeTitletitleExists(page)
local success, title = pcall(mw.title.new, page)
ifreturn success thenand title.exists
return title
end
end
 
Line १,६६७ ⟶ १,६६६:
return nil
end
local raPage = 'Wikipedia:Recent additions/' ..
.. getDate('Y/F#j F Y', data[1].date)
if not titleExists(raPage) then
do
raPage = 'Wikipedia:Recent additions'
local raTitle = makeTitle(raPage)
if not raTitle or not raTitle.exists then
raPage = 'Wikipedia:Recent additions'
end
end
local blurb = string.format(