Module:Redirect hatnote: Difference between revisions
Content deleted Content added
Johnrdorazio (talk | contribs) m 1 revision imported |
Johnrdorazio (talk | contribs) m 1 revision imported |
||
(One intermediate revision by one other user not shown) | |||
Line 68:
-- Functionality for adding categories
local categoryTable = {}
local function addCategory(cat)
if cat and cat ~= '' then
-- Add by index to avoid duplicates
Line 76:
--Generate tracking categories
local mhOptions = {}
local redirTitle
for k,v in pairs(redirect) do
-- We don't need a tracking category if the template invocation has been
Line 82 ⟶ 83:
and currentTitle.namespace == 0 or currentTitle.namespace == 14
then
if not
addCategory('Missing redirects')
elseif not
if string.find(redirTitle:getContent(), '#invoke:RfD') then
addCategory('Articles with redirect hatnotes needing review')▼
addCategory('Articles with redirect hatnotes impacted by RfD')
else
▲ addCategory('Articles with redirect hatnotes needing review')
end
else
local
addCategory('Articles with redirect hatnotes needing review')
end
Line 99 ⟶ 102:
-- Generate the options to pass to [[Module:Hatnote]].
if currentTitle.namespace == 0 and not mhOptions.selfref
and
then
-- We are on a mainspace page, and the hatnote starts with something
|