Content deleted Content added
Manually reverting Special:Diff/1121360955 |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
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 discussions 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
end▼
lastTitle = title
end
end
end
if
if total > 0 then
return "[[" .. rfd .. "#" ..
else
return "[[" .. rfd .. "|0]]"
else
return
end
end
|