<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://polysleep.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_for_deprecated_parameters</id>
	<title>Module:Check for deprecated parameters - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://polysleep.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_for_deprecated_parameters"/>
	<link rel="alternate" type="text/html" href="https://polysleep.org/index.php?title=Module:Check_for_deprecated_parameters&amp;action=history"/>
	<updated>2026-04-30T07:18:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://polysleep.org/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=1500&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://polysleep.org/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=1500&amp;oldid=prev"/>
		<updated>2020-11-20T06:19:43Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:19, 20 November 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&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;!-- diff cache key my_wiki:diff:1.41:old-1499:rev-1500 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://polysleep.org/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=1499&amp;oldid=prev</id>
		<title>Wikipedia&gt;MusikAnimal: Protected &quot;Module:Check for deprecated parameters&quot;: High-risk module ([Edit=Require template editor access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://polysleep.org/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=1499&amp;oldid=prev"/>
		<updated>2019-01-24T21:20:05Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/wiki/Module:Check_for_deprecated_parameters&quot; title=&quot;Module:Check for deprecated parameters&quot;&gt;Module:Check for deprecated parameters&lt;/a&gt;&amp;quot;: &lt;a href=&quot;https://en.wikipedia.org/wiki/High-risk_templates&quot; class=&quot;extiw&quot; title=&quot;wikipedia:High-risk templates&quot;&gt;High-risk module&lt;/a&gt; ([Edit=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;-- This module may be used to compare the arguments passed to the parent&lt;br /&gt;
-- with a list of arguments, returning a specified result if an argument is&lt;br /&gt;
-- on the list&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function trim(s)&lt;br /&gt;
	return s:match(&amp;#039;^%s*(.-)%s*$&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isnotempty(s)&lt;br /&gt;
	return s and trim(s) ~= &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.check (frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local pargs = frame:getParent().args&lt;br /&gt;
	local ignoreblank = isnotempty(frame.args[&amp;#039;ignoreblank&amp;#039;])&lt;br /&gt;
	local deprecated = frame.args[&amp;#039;category&amp;#039;]&lt;br /&gt;
	local preview = frame.args[&amp;#039;preview&amp;#039;] or &amp;#039;Page using [[&amp;#039;..frame:getParent():getTitle()..&amp;#039;]] with deprecated parameter _VALUE_&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	local dep_values = {}&lt;br /&gt;
	local values = {}&lt;br /&gt;
	local res = {}&lt;br /&gt;
&lt;br /&gt;
	-- create the table of deprecated values and their matching new value&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if k == &amp;#039;ignoreblank&amp;#039; or k == &amp;#039;preview&amp;#039; or k == &amp;#039;deprecated&amp;#039; then else&lt;br /&gt;
			dep_values[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if isnotempty(preview) then &lt;br /&gt;
		preview = &amp;#039;&amp;lt;div class=&amp;quot;hatnote&amp;quot; style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;Warning:&amp;lt;/strong&amp;gt; &amp;#039; .. preview .. &amp;#039; (this message is shown only in preview).&amp;lt;/div&amp;gt;&amp;#039;&lt;br /&gt;
	elseif preview == nil then&lt;br /&gt;
		preview = deprecated&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- loop over the parent args and see if any are deprecated&lt;br /&gt;
	for k, v in pairs(pargs) do&lt;br /&gt;
		if ignoreblank then&lt;br /&gt;
			if dep_values[k] and v~=&amp;#039;&amp;#039; then&lt;br /&gt;
				table.insert(values, k)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			if dep_values[k] then&lt;br /&gt;
				table.insert(values, k)&lt;br /&gt;
			end	&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- add resuls to the output tables&lt;br /&gt;
	if #values &amp;gt; 0 then&lt;br /&gt;
		if frame:preprocess( &amp;quot;{{REVISIONID}}&amp;quot; ) == &amp;quot;&amp;quot; then&lt;br /&gt;
			deprecated = preview&lt;br /&gt;
			for k, v in pairs(values) do&lt;br /&gt;
				if v == &amp;#039;&amp;#039; then&lt;br /&gt;
				-- Fix odd bug for | = which gets stripped to the empty string and&lt;br /&gt;
				-- breaks category links&lt;br /&gt;
				v = &amp;#039; &amp;#039;&lt;br /&gt;
				end&lt;br /&gt;
				local r =  deprecated:gsub(&amp;#039;_VALUE_&amp;#039;, (&amp;#039;&amp;quot;&amp;#039;..v..&amp;#039;&amp;quot;. replace with &amp;quot;&amp;#039;..dep_values[v]..&amp;#039;&amp;quot;&amp;#039;))&lt;br /&gt;
				table.insert(res, r)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			for k, v in pairs(values) do&lt;br /&gt;
				local r =  deprecated:gsub(&amp;#039;_VALUE_&amp;#039;, v)&lt;br /&gt;
				table.insert(res, r)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(res)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;MusikAnimal</name></author>
	</entry>
</feed>