Module:Redirect-distinguish: Difference between revisions

Added redirect checks
(Mostly-complete implementation of Template:Redirect-distinguish in Lua)
 
(Added redirect checks)
Line 19:
)
end
local redirectTitle = mw.title.new(args[1])
--TODO: Lua replacement of #ifexist checks of arg[1]
if redirectTitle and redirectTitle.exists then
if not redirectTitle.isRedirect then
args[1] = args[1] .. '[[Category:Articles with redirect hatnotes needing review]]'
end
else
args[1] = args[1] .. '[[Category:Missing redirects]]'
end
if not args[2] then
return mHatnote.makeWikitextError(
Anonymous user