<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nicolas-barbot.ovh/wiki/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://nicolas-barbot.ovh/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_for_deprecated_parameters"/>
	<link rel="alternate" type="text/html" href="https://nicolas-barbot.ovh/wiki/index.php?title=Module:Check_for_deprecated_parameters&amp;action=history"/>
	<updated>2026-04-13T04:13:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.0</generator>
	<entry>
		<id>https://nicolas-barbot.ovh/wiki/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=302&amp;oldid=prev</id>
		<title>Nico: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://nicolas-barbot.ovh/wiki/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=302&amp;oldid=prev"/>
		<updated>2021-06-07T23:45:37Z</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;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:45, 7 June 2021&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>Nico</name></author>
	</entry>
	<entry>
		<id>https://nicolas-barbot.ovh/wiki/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=301&amp;oldid=prev</id>
		<title>en&gt;Izno: use if preview</title>
		<link rel="alternate" type="text/html" href="https://nicolas-barbot.ovh/wiki/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=301&amp;oldid=prev"/>
		<updated>2021-05-09T23:53:33Z</updated>

		<summary type="html">&lt;p&gt;use if preview&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('^%s*(.-)%s*$')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isnotempty(s)&lt;br /&gt;
	return s and trim(s) ~= ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.check (frame)&lt;br /&gt;
	-- create the table of deprecated values and their matching new value&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local dep_values = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if k == 'ignoreblank' or k == 'preview' or k == 'deprecated' then else&lt;br /&gt;
			dep_values[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- loop over the parent args and see if any are deprecated&lt;br /&gt;
	local values = {}&lt;br /&gt;
	local ignoreblank = isnotempty(frame.args['ignoreblank'])&lt;br /&gt;
	local pargs = frame:getParent().args&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~='' 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 results to the output tables&lt;br /&gt;
	local res = {}&lt;br /&gt;
	if #values &amp;gt; 0 then&lt;br /&gt;
		local preview = frame.args['preview'] or&lt;br /&gt;
			'Page using [['..frame:getParent():getTitle()..']] with deprecated parameter _VALUE_'&lt;br /&gt;
		if isnotempty(preview) then&lt;br /&gt;
			preview = require('Module:If preview')._warning({&lt;br /&gt;
				preview&lt;br /&gt;
			})&lt;br /&gt;
		end&lt;br /&gt;
		-- Kind of dangerous to trust that this is never nil, but I guess it's&lt;br /&gt;
		-- preferable to display that the use of the module is broken rather than&lt;br /&gt;
		-- have some sort of tracking category for pages which have an unknown&lt;br /&gt;
		-- parent tracking template.&lt;br /&gt;
		local category = frame.args['category']&lt;br /&gt;
		for k, v in pairs(values) do&lt;br /&gt;
			local c = category:gsub('_VALUE_', v)&lt;br /&gt;
			table.insert(res, c)&lt;br /&gt;
			if v == '' then&lt;br /&gt;
				-- Fix odd bug for | = which gets stripped to the empty string&lt;br /&gt;
				-- and breaks category links&lt;br /&gt;
				v = ' '&lt;br /&gt;
			end&lt;br /&gt;
			local p = preview:gsub(&lt;br /&gt;
				'_VALUE_',&lt;br /&gt;
				'&amp;quot;'..v..'&amp;quot;. Replace with &amp;quot;'..dep_values[v]..'&amp;quot;.'&lt;br /&gt;
			)&lt;br /&gt;
			table.insert(res, p )&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>en&gt;Izno</name></author>
	</entry>
</feed>