<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.filipefonseca.pt/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect-distinguish</id>
	<title>Module:Redirect-distinguish - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.filipefonseca.pt/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect-distinguish"/>
	<link rel="alternate" type="text/html" href="http://wiki.filipefonseca.pt/index.php?title=Module:Redirect-distinguish&amp;action=history"/>
	<updated>2026-04-19T00:26:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>http://wiki.filipefonseca.pt/index.php?title=Module:Redirect-distinguish&amp;diff=7792&amp;oldid=prev</id>
		<title>FilipeFonseca: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.filipefonseca.pt/index.php?title=Module:Redirect-distinguish&amp;diff=7792&amp;oldid=prev"/>
		<updated>2021-07-11T12:23:24Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mHatnote = require('Module:Hatnote')&lt;br /&gt;
local mHatlist = require('Module:Hatnote list')&lt;br /&gt;
local mArguments --initialize lazily&lt;br /&gt;
local mTableTools = require('Module:TableTools')&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.redirectDistinguish (frame)&lt;br /&gt;
	mArguments = require('Module:Arguments')&lt;br /&gt;
	local args = mArguments.getArgs(frame)&lt;br /&gt;
	return p._redirectDistinguish(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._redirectDistinguish(args)&lt;br /&gt;
	if not args[1] then&lt;br /&gt;
		return mHatnote.makeWikitextError(&lt;br /&gt;
			'no redirect supplied',&lt;br /&gt;
			'Template:Redirect-distinguish',&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	local redirectTitle = mw.title.new(args[1])&lt;br /&gt;
	local currentTitle = currentTitle or mw.title.getCurrentTitle()&lt;br /&gt;
	if&lt;br /&gt;
		string.match(args[1], 'REDIRECT%d+') or&lt;br /&gt;
		args[1] == 'TERM' or&lt;br /&gt;
		currentTitle.namespace ~= 0&lt;br /&gt;
	then&lt;br /&gt;
		--do nothing&lt;br /&gt;
	elseif not redirectTitle or not redirectTitle.exists then&lt;br /&gt;
		args[1] = args[1] .. '[[Category:Missing redirects]]'&lt;br /&gt;
	elseif not redirectTitle.isRedirect then&lt;br /&gt;
		if string.find(redirectTitle:getContent(), '#invoke:RfD') then&lt;br /&gt;
			args[1] = args[1] ..&lt;br /&gt;
				'[[Category:Articles with redirect hatnotes impacted by RfD]]'&lt;br /&gt;
		else&lt;br /&gt;
			args[1] = args[1] ..&lt;br /&gt;
				'[[Category:Articles with redirect hatnotes needing review]]'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if not args[2] then&lt;br /&gt;
		return mHatnote.makeWikitextError(&lt;br /&gt;
			'no page to be distinguished supplied',&lt;br /&gt;
			'Template:Redirect-distinguish',&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	args = mTableTools.compressSparseArray(args)&lt;br /&gt;
	--Assignment by removal here makes for convenient concatenation later&lt;br /&gt;
	local redirect = table.remove(args, 1)&lt;br /&gt;
	local text = string.format(&lt;br /&gt;
		'&amp;quot;%s&amp;quot; redirects here. It is not to be confused with %s.',&lt;br /&gt;
		redirect,&lt;br /&gt;
		mHatlist.orList(args, true)&lt;br /&gt;
	)&lt;br /&gt;
	return mHatnote._hatnote(text)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FilipeFonseca</name></author>
	</entry>
</feed>