Content deleted Content added
Properly match up with current Template:XFD backlog behavior |
Refactor |
||
Line 3:
-- and "Old" discussions aren't displayed separately from "Current" ones
function p.rfd(frame)
local month = frame.args.month
local rfd = "Wikipedia:Redirects for discussion"
local logprefix = "Wikipedia:Redirects for discussion/Log/"
-- threshold is 7 days ago
local threshold = os.date("%F",os.time() - (86400*7))
local
local lang = mw.getContentLanguage()
-- Find the daily pages
local content = mw.title.new(rfd):getContent()
local dayPattern = "{{" .. logprefix .. "(.-)}}";
local total = 0
local
for
local
if
-- These dicussions aren't seven days old yet
local dayContent = mw.title.new(logprefix .. ymd):getContent()▼
local dayTitle = logprefix .. day;
-- Match only title sections starting with lists or templates▼
for openTitle in dayContent:gmatch("==== ?([^\n]-) ?====%s+[%*%#%{]", "") do▼
total = total + 1▼
for title in dayContent:gmatch(titlePattern) do
lastTitle = title
end
end
Line 30 ⟶ 33:
if month == "total" then
if total > 0 then
return "[[" .. rfd .. "#" ..
else
return "[[" .. rfd .. "|0]]"
|