<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindpowe.red/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect_template</id>
	<title>Module:Redirect template - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindpowe.red/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect_template"/>
	<link rel="alternate" type="text/html" href="https://mindpowe.red/wiki/index.php?title=Module:Redirect_template&amp;action=history"/>
	<updated>2026-04-06T05:33:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://mindpowe.red/wiki/index.php?title=Module:Redirect_template&amp;diff=796&amp;oldid=prev</id>
		<title>WikiSysop: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://mindpowe.red/wiki/index.php?title=Module:Redirect_template&amp;diff=796&amp;oldid=prev"/>
		<updated>2020-08-07T21:33:42Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:33, 7 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>WikiSysop</name></author>
		
	</entry>
	<entry>
		<id>https://mindpowe.red/wiki/index.php?title=Module:Redirect_template&amp;diff=795&amp;oldid=prev</id>
		<title>en&gt;Paine Ellsworth: xfer from sandbox per edit request at template talk page</title>
		<link rel="alternate" type="text/html" href="https://mindpowe.red/wiki/index.php?title=Module:Redirect_template&amp;diff=795&amp;oldid=prev"/>
		<updated>2019-01-05T01:46:24Z</updated>

		<summary type="html">&lt;p&gt;xfer from sandbox per edit request at &lt;a href=&quot;/wiki/index.php?title=Template_talk:Redirect_template&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Template talk:Redirect template (page does not exist)&quot;&gt;template talk page&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require('Module:No globals')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- key is beginning of arg name. value is table with namespace number and link&lt;br /&gt;
-- alternatively, a function taking the namespace number and returning a validity&lt;br /&gt;
-- can be used&lt;br /&gt;
local namespaceCategories = {&lt;br /&gt;
	all = { function() return true end },&lt;br /&gt;
	main = { 0, '[[wp:mainspace|main]]' },&lt;br /&gt;
	help = { 12, '[[wp:help namespace|help]]' },&lt;br /&gt;
	portal = { 100, '[[wp:portal|portal]]' },&lt;br /&gt;
	talk = { function(n) return n &amp;gt; 0 and n%2 == 1 end, '[[Help:Using talk pages|talk]]' },&lt;br /&gt;
	template = { 10, '[[wp:template namespace|template]]' },&lt;br /&gt;
	wikipedia = { 4, '[[wp:project namespace|Wikipedia project]]' },&lt;br /&gt;
	category = { 14, '[[wp:categorization|category]]' },&lt;br /&gt;
	user = { 2, '[[wp:user pages|user]]' },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- remove whitespaces from beginning and end of args&lt;br /&gt;
local function valueFunc(key, val)&lt;br /&gt;
	if type(val) == 'string' then&lt;br /&gt;
		val = val:match('^%s*(.-)%s*$')&lt;br /&gt;
		if val == '' then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return val&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getPrettyName(args)&lt;br /&gt;
	for k in pairs(namespaceCategories) do&lt;br /&gt;
		if args[k .. ' category'] then&lt;br /&gt;
			return string.format(&amp;quot;'''[[:Category:%s|%s]]''': &amp;quot;, args[k .. ' category'], args.name)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return string.format(&amp;quot;'''%s''': &amp;quot;, args.name)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Redirect template', valueFunc = valueFunc})&lt;br /&gt;
	local namespace = mw.title.getCurrentTitle().namespace&lt;br /&gt;
&lt;br /&gt;
	--- XXX: this is a HORRIBLE HACK. kill it with fire as soon as https://bugzilla.wikimedia.org/show_bug.cgi?id=12974 is fixed&lt;br /&gt;
	local beCompatibleWithBug12974 = args.info and (args.info:find('^[:;#*]', 1) == 1 or args.info:find('{|', 1, true) == 1) and '\n' or ' '&lt;br /&gt;
	&lt;br /&gt;
	local content = string.format('\n&amp;lt;div class=&amp;quot;rcat %s&amp;quot;&amp;gt;\n*%sThis is a redirect%s%s.%s%s&amp;lt;/div&amp;gt;',&lt;br /&gt;
		args.class or '',&lt;br /&gt;
		args.name and getPrettyName(args) or '',&lt;br /&gt;
		args.from and (' from ' .. args.from) or '',&lt;br /&gt;
		args.to and (' to ' .. args.to) or '',&lt;br /&gt;
		args.info and beCompatibleWithBug12974 or '',&lt;br /&gt;
		args.info or ''&lt;br /&gt;
	)&lt;br /&gt;
	&lt;br /&gt;
	for k,v in pairs(namespaceCategories) do&lt;br /&gt;
		if args[k .. ' category'] then&lt;br /&gt;
			if type(v[1]) == 'function' and v[1](namespace) or v[1] == namespace then&lt;br /&gt;
				content = content .. string.format('[[Category:%s]]', args[k .. ' category'])&lt;br /&gt;
			elseif args['other category'] then&lt;br /&gt;
				content = content .. string.format('[[Category:%s]]', args['other category'])&lt;br /&gt;
			else&lt;br /&gt;
				content = content .. frame:expandTemplate{title = 'Incorrect redirect template', args = {v[2]}}&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if namespace == 0 then&lt;br /&gt;
		local yesno = require('Module:Yesno')&lt;br /&gt;
		if yesno(args.printworthy) == true then&lt;br /&gt;
			return content .. '[[Category:Printworthy redirects]]'&lt;br /&gt;
		elseif yesno(args.printworthy) == false then&lt;br /&gt;
			return content .. '[[Category:Unprintworthy redirects]]'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return content&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>en&gt;Paine Ellsworth</name></author>
		
	</entry>
</feed>