Module:Redirect hatnote: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(check category-space hatnotes too)
Line 134: Line 134:
-- Generate the tracking category.
-- Generate the tracking category.
-- We don't need a tracking category if the template invocation has been
-- We don't need a tracking category if the template invocation has been
-- copied directly from the docs, or if we aren't in mainspace.
-- copied directly from the docs, or if we aren't in mainspace or category-space.
local category
local category
if not redirect:find('^REDIRECT%d*$') and redirect ~= 'TERM' --
if not redirect:find('^REDIRECT%d*$') and redirect ~= 'TERM' --
and currentTitle.namespace == 0
and currentTitle.namespace == 0 or currentTitle.namespace == 14
then
then
redirectTitle = redirectTitle or getTitle(redirect)
redirectTitle = redirectTitle or getTitle(redirect)