Modul:Redirect hatnote: Unterschied zwischen den Versionen

(Updated from sandbox with fix for the other argument initialization bug :/)
(Updated module from sandbox. Removes dependency on Module:Redirect, and introduces more fine-grained categorization for redirect problems.)
Zeile 87: Zeile 87:
addCategory('Missing redirects')
addCategory('Missing redirects')
elseif not redirTitle.isRedirect then
elseif not redirTitle.isRedirect then
addCategory('Articles with redirect hatnotes needing review')
if string.find(redirTitle:getContent(), '#invoke:RfD') then
addCategory('Articles with redirect hatnotes impacted by RfD')
else
addCategory('Articles with redirect hatnotes needing review')
end
else
else
local mRedirect = require('Module:Redirect')
local target = targetTitle or redirTitle.redirectTarget
local target = mRedirect.getTarget(redirTitle)
target = targetTitle or target and getTitle(target)
if target and target ~= currentTitle then
if target and target ~= currentTitle then
addCategory('Articles with redirect hatnotes needing review')
addCategory('Articles with redirect hatnotes needing review')