<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
	<id>https://www.insurerbrain.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirectData</id>
	<title>Module:RedirectData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.insurerbrain.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirectData"/>
	<link rel="alternate" type="text/html" href="https://www.insurerbrain.com/w/index.php?title=Module:RedirectData&amp;action=history"/>
	<updated>2026-04-30T17:02:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://www.insurerbrain.com/w/index.php?title=Module:RedirectData&amp;diff=201&amp;oldid=prev</id>
		<title>Wikilah admin: Created page with &quot;local p = {}  function p.getRedirectToNamespace(frame) 	titleObject = mw.title.getCurrentTitle() -- check if this is a redirect 	if titleObject.redirectTarget then 		targetNamespace = titleObject.redirectTarget.nsText 		return targetNamespace 	end 	return &quot;Notaredirect&quot; end  function p.getTalkPage(frame) -- this is code written to check for the criteria to apply {{R to talk page}} - essentially, whether the redirect is outside of, and going into, a talk namespace 	titleO...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.insurerbrain.com/w/index.php?title=Module:RedirectData&amp;diff=201&amp;oldid=prev"/>
		<updated>2025-09-18T03:09:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  function p.getRedirectToNamespace(frame) 	titleObject = mw.title.getCurrentTitle() -- check if this is a redirect 	if titleObject.redirectTarget then 		targetNamespace = titleObject.redirectTarget.nsText 		return targetNamespace 	end 	return &amp;quot;Notaredirect&amp;quot; end  function p.getTalkPage(frame) -- this is code written to check for the criteria to apply {{R to talk page}} - essentially, whether the redirect is outside of, and going into, a talk namespace 	titleO...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.getRedirectToNamespace(frame)&lt;br /&gt;
	titleObject = mw.title.getCurrentTitle() -- check if this is a redirect&lt;br /&gt;
	if titleObject.redirectTarget then&lt;br /&gt;
		targetNamespace = titleObject.redirectTarget.nsText&lt;br /&gt;
		return targetNamespace&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;Notaredirect&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getTalkPage(frame) -- this is code written to check for the criteria to apply {{R to talk page}} - essentially, whether the redirect is outside of, and going into, a talk namespace&lt;br /&gt;
	titleObject = mw.title.getCurrentTitle() -- check if this is a redirect&lt;br /&gt;
	if titleObject.redirectTarget then&lt;br /&gt;
		if not titleObject.isTalkPage then -- the current page is NOT a talk page&lt;br /&gt;
			if titleObject.redirectTarget.isTalkPage then -- the target page IS a talk page&lt;br /&gt;
				return &amp;quot;Yes&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;quot;No&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;Notaredirect&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getSubpageStatus(frame)&lt;br /&gt;
	titleObject = mw.title.getCurrentTitle()&lt;br /&gt;
	if titleObject.redirectTarget then -- check if this is a redirect&lt;br /&gt;
		pageIsSubpage = titleObject.isSubpage&lt;br /&gt;
		targetIsSubpage = titleObject.redirectTarget.isSubpage&lt;br /&gt;
		if (pageIsSubpage or targetIsSubpage) then&lt;br /&gt;
			if (pageIsSubpage and targetIsSubpage) then&lt;br /&gt;
				return &amp;quot;Both&amp;quot; -- both are subpages, return three&lt;br /&gt;
			elseif pageIsSubpage then&lt;br /&gt;
				return &amp;quot;Onlypage&amp;quot; -- just the page is a subpage, target isn&amp;#039;t, return one&lt;br /&gt;
			else&lt;br /&gt;
				return &amp;quot;Onlytarget&amp;quot; -- just the target is a subpage, the page isn&amp;#039;t, return two&lt;br /&gt;
			end&lt;br /&gt;
		else -- neither page nor target is a subpage, return zero&lt;br /&gt;
			return &amp;quot;Neither&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;Notaredirect&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.toDisambig(frame) -- this checks if the page title contains (disambiguation), as well as if it&amp;#039;s a talkpage&lt;br /&gt;
	titleObject = mw.title.getCurrentTitle()&lt;br /&gt;
	if titleObject.redirectTarget then -- check if this is a redirect&lt;br /&gt;
		if string.match(titleObject.text, &amp;quot;(disambiguation)&amp;quot;) then -- title contains (disambiguation)&lt;br /&gt;
			if titleObject.isTalkPage then -- this is a talk page ({{R from unnecessary disambiguation}})&lt;br /&gt;
				return &amp;quot;Talk&amp;quot;&lt;br /&gt;
			else -- this is not a talkpage ({{R to disambiguation page}})&lt;br /&gt;
				return &amp;quot;Article&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		else -- title does not contain &amp;quot;(disambiguation)&amp;quot;&lt;br /&gt;
			return &amp;quot;No&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;Notaredirect&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikilah admin</name></author>
	</entry>
</feed>