Module:Redirect-distinguish: Difference between revisions

Content deleted Content added
m Protected "Module:Redirect-distinguish": High-risk Lua module; 1,000+ transclusions ([Edit=Require autoconfirmed or confirmed access] (indefinite))
Updated maintenance category output to handle new Category:Articles with redirect hatnotes impacted by RfD case
Line 20:
end
local redirectTitle = mw.title.new(args[1])
elseif notif string.match(args[1], 'REDIRECT%d+') and notor args[1] == 'TERM' then
if redirectTitle and redirectTitle.exists then
--do nothing
if not redirectTitle.isRedirect then
ifelseif not redirectTitle andor not redirectTitle.exists then
args[1] = args[1] .. '[[Category:Articles with redirect hatnotes needing review]]'
end
elseif not string.match(args[1], 'REDIRECT%d+') and not args[1] == 'TERM' then
args[1] = args[1] .. '[[Category:Missing redirects]]'
if elseif not redirectTitle.isRedirect then
if string.find(redirectTitle:getContent(), '#invoke:RfD') then
args[1] = args[1] ..
'[[Category:Articles with redirect hatnotes impacted by RfD]]'
else
args[1] = args[1] ..
args[1] = args[1] .. '[[Category:Articles with redirect hatnotes needing review]]'
end
end
if not args[2] then