<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ARfD_close</id>
	<title>Module:RfD close - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ARfD_close"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:RfD_close&amp;action=history"/>
	<updated>2026-06-07T19:03:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:RfD_close&amp;diff=144664&amp;oldid=prev</id>
		<title>imported&gt;JJMC89: Protected &quot;Module:RfD close&quot;: Highly visible module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:RfD_close&amp;diff=144664&amp;oldid=prev"/>
		<updated>2019-03-02T04:17:02Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/research/Module:RfD_close&quot; title=&quot;Module:RfD close&quot;&gt;Module:RfD close&lt;/a&gt;&amp;quot;: &lt;a href=&quot;/index.php?title=WP:High-risk_templates&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:High-risk templates (page does not exist)&quot;&gt;Highly visible module&lt;/a&gt; ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local rfd = {}&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdt_before_result(frame) --this bit creates the &amp;quot;closed discussion&amp;quot; notice&lt;br /&gt;
	--define function to check whether arguments are defined&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
&lt;br /&gt;
	local function argIsSet(key)&lt;br /&gt;
		if args[key] and args[key]:find(&amp;#039;%S&amp;#039;) then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local function match_result(result_parameter) --takes string as input, spews two strings as output&lt;br /&gt;
			&lt;br /&gt;
		local find_count = 0&lt;br /&gt;
		&lt;br /&gt;
		local result_match = &amp;#039;&amp;#039;&lt;br /&gt;
		local icon_filename = &amp;#039;&amp;#039;&lt;br /&gt;
		&lt;br /&gt;
		local parameter_lower = result_parameter:lower()&lt;br /&gt;
		&lt;br /&gt;
		--I thought about using an array and a for-loop, but the logic is &lt;br /&gt;
		--sufficiently complicated (there is no built-in &amp;quot;or&amp;quot; in Lua string &lt;br /&gt;
		--patterns) so I&amp;#039;ll just lay it flat.&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;keep&amp;#039;) or parameter_lower:find(&amp;#039;withdraw&amp;#039;) or parameter_lower:find(&amp;#039;refine&amp;#039;)) then&lt;br /&gt;
			result_match = &amp;#039;Keep&amp;#039;&lt;br /&gt;
			icon_filename = &amp;#039;File:White check mark in dark green rounded square.svg&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;delete&amp;#039;)) then&lt;br /&gt;
			result_match = &amp;#039;Delete&amp;#039;&lt;br /&gt;
			icon_filename = &amp;#039;File:White x in red rounded square.svg&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;retarget&amp;#039;) or parameter_lower:find(&amp;#039;soft redirect&amp;#039;))then&lt;br /&gt;
			result_match = &amp;#039;Retarget&amp;#039;&lt;br /&gt;
			icon_filename = &amp;#039;File:Right-pointing white arrow in blue rounded square.svg&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;disambig&amp;#039;) or parameter_lower:find(&amp;#039;dab&amp;#039;) or parameter_lower:find(&amp;#039;sia&amp;#039;) or parameter_lower:find(&amp;#039;set index&amp;#039;)) then&lt;br /&gt;
			result_match = &amp;#039;Disambiguate&amp;#039;&lt;br /&gt;
			icon_filename = &amp;#039;File:Three disambiguation arrows icon in rounded blue square.svg&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;no consensus&amp;#039;) and find_count == 0) then&lt;br /&gt;
			--This catches instances of &amp;quot;no consensus&amp;quot; that isn&amp;#039;t qualified by &amp;quot;default to [keep/delete]&amp;quot;&lt;br /&gt;
			result_match = &amp;#039;No consensus&amp;#039;&lt;br /&gt;
			icon_filename = &amp;#039;File:White equals sign on grey rounded square.svg&amp;#039;&lt;br /&gt;
			find_count = 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if find_count &amp;gt;= 2 or (argIsSet(&amp;#039;result&amp;#039;) and find_count == 0) then&lt;br /&gt;
			result_match = &amp;#039;Split or bespoke decisions&amp;#039;&lt;br /&gt;
			icon_filename = &amp;#039;File:White i in purple rounded square.svg&amp;#039;&lt;br /&gt;
		elseif find_count &amp;lt;= 0 then&lt;br /&gt;
			result_match = &amp;#039;No decision&amp;#039;&lt;br /&gt;
			icon_filename = &amp;#039;File:50% grey rounded square.svg&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		return result_match, icon_filename&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Detect result first, default to &amp;quot;no decision&amp;quot; if arg not set&lt;br /&gt;
	local result_match = &amp;#039;No decision&amp;#039;&lt;br /&gt;
	local icon_filename = &amp;#039;File:50% grey rounded square.svg&amp;#039;&lt;br /&gt;
	local result_string = &amp;#039;&amp;#039;&lt;br /&gt;
	if (argIsSet(&amp;#039;result&amp;#039;)) then&lt;br /&gt;
		result_string = &amp;#039; Result was: &amp;#039;&lt;br /&gt;
		result_match, icon_filename = match_result(args[&amp;#039;result&amp;#039;])&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Build wikitext for result icon&lt;br /&gt;
	local message_string1 = &amp;#039;&amp;lt;includeonly&amp;gt;&amp;#039; --includeonly tag&lt;br /&gt;
	--then dump the icon&lt;br /&gt;
	.. &amp;#039;[[&amp;#039; .. icon_filename&lt;br /&gt;
	.. &amp;#039;|16px|link=|alt=&amp;#039; .. result_match .. &amp;quot;]] &amp;#039;&amp;#039;&amp;#039;Closed discussion&amp;#039;&amp;#039;&amp;#039;, see [[&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	--Build wikilink to full discussion.&lt;br /&gt;
	--mw.title.getCurrentTitle() will resolve correctly if substed&lt;br /&gt;
	local timestamp_string = os.time()&lt;br /&gt;
	local link_string = tostring(mw.title.getCurrentTitle()) ..  &amp;#039;#&amp;#039; .. timestamp_string&lt;br /&gt;
	local message_string2 = &amp;#039;|full discussion]].&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	--Complete the includeonly result message and build the anchor on daily log page&lt;br /&gt;
	local end_string = &amp;#039;&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;span id=&amp;quot;&amp;#039; .. timestamp_string .. &amp;#039;&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	--Put it all together and return from Lua&lt;br /&gt;
	return message_string1 .. link_string .. message_string2 .. result_string .. end_string&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdt_show_result(frame)&lt;br /&gt;
	return &amp;#039;&amp;lt;/noinclude&amp;gt;&amp;#039; .. frame.args[&amp;#039;result&amp;#039;] .. &amp;#039;&amp;lt;includeonly&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdb_noinclude(frame)&lt;br /&gt;
	return &amp;#039;&amp;lt;/noinclude&amp;gt;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return rfd&lt;/div&gt;</summary>
		<author><name>imported&gt;JJMC89</name></author>
	</entry>
</feed>