<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cern.ch/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://wiki.cern.ch/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_for_deprecated_parameters"/>
	<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Check_for_deprecated_parameters&amp;action=history"/>
	<updated>2026-04-04T18:58:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.cern.ch/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=6176&amp;oldid=prev</id>
		<title>Bbergia: 1 revision imported from :wikipedia:Module:Check_for_deprecated_parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=6176&amp;oldid=prev"/>
		<updated>2026-01-15T09:53:28Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported from &lt;a href=&quot;https://en.wikipedia.org/wiki/Module:Check_for_deprecated_parameters&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Module:Check for deprecated parameters&quot;&gt;wikipedia:Module:Check_for_deprecated_parameters&lt;/a&gt;&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 09:53, 15 January 2026&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>Bbergia</name></author>
	</entry>
	<entry>
		<id>https://wiki.cern.ch/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=6175&amp;oldid=prev</id>
		<title>wikipedia&gt;Hike395: remove &quot;deprecated&quot; from list of parameters to this module</title>
		<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Check_for_deprecated_parameters&amp;diff=6175&amp;oldid=prev"/>
		<updated>2025-11-20T11:54:16Z</updated>

		<summary type="html">&lt;p&gt;remove &amp;quot;deprecated&amp;quot; from list of parameters to this module&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 isnotempty(s)&lt;br /&gt;
	return s and mw.text.trim(s) ~= &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function scanValues(values,results,args,replaceTable)&lt;br /&gt;
    for k, v in pairs(values) do&lt;br /&gt;
		local c = args.category:gsub(&amp;#039;_VALUE_&amp;#039;, v)&lt;br /&gt;
		table.insert(results, c)&lt;br /&gt;
		if v == &amp;#039;&amp;#039; 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 = &amp;#039; &amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
        local replaceString = &amp;#039;&amp;quot;&amp;#039;..v..&amp;#039;&amp;quot;. &amp;#039;&lt;br /&gt;
        local replaceValue = replaceTable and replaceTable[v]&lt;br /&gt;
        replaceString = replaceString..(replaceValue and &amp;#039;Replace with &amp;quot;&amp;#039;..replaceValue..&amp;#039;&amp;quot;.&amp;#039; or &amp;#039;It should be removed.&amp;#039;)&lt;br /&gt;
		local p = args.preview:gsub(&amp;#039;_VALUE_&amp;#039;,replaceString)&lt;br /&gt;
		table.insert(results, p )&lt;br /&gt;
	end&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;
	return p._check(frame.args, frame:getParent().args, frame:getParent():getTitle())&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local moduleParams = {ignoreblank=true, preview=true, _category=true, _remove=true}&lt;br /&gt;
&lt;br /&gt;
function p._check(args, pargs, caller)&lt;br /&gt;
	local dep_values = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
        if not moduleParams[k] then&lt;br /&gt;
			dep_values[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Parse params to remove&lt;br /&gt;
	local removes = {}&lt;br /&gt;
	if args[&amp;#039;_remove&amp;#039;] then&lt;br /&gt;
		for r in args[&amp;#039;_remove&amp;#039;]:gmatch(&amp;quot;([^;]+)&amp;quot;) do&lt;br /&gt;
            removes[mw.text.trim(r)] = 1&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 remove_values = {}&lt;br /&gt;
	local ignoreblank = isnotempty(args[&amp;#039;ignoreblank&amp;#039;])&lt;br /&gt;
	for k, v in pairs(pargs) do&lt;br /&gt;
        if not ignoreblank or isnotempty(v) then&lt;br /&gt;
			if dep_values[k] then&lt;br /&gt;
				table.insert(values, k)&lt;br /&gt;
			elseif removes[k] then&lt;br /&gt;
				table.insert(remove_values, k)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
    -- find out about calling context&lt;br /&gt;
    local title = mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
    -- create local defaulted arguments&lt;br /&gt;
    local category = args[&amp;quot;_category&amp;quot;] or title.namespace == 0 and &amp;quot;[[Category:Pages with deprecated parameters]]&amp;quot; or &amp;quot;&amp;quot;&lt;br /&gt;
	local preview = args[&amp;#039;preview&amp;#039;] or &amp;#039;Page using [[&amp;#039;..caller..&amp;#039;]] with deprecated parameter _VALUE_&amp;#039;&lt;br /&gt;
	if isnotempty(preview) then&lt;br /&gt;
		preview = require(&amp;#039;Module:If preview&amp;#039;)._warning({preview})&lt;br /&gt;
	end&lt;br /&gt;
    local localArgs = {category=category,preview=preview}&lt;br /&gt;
	&lt;br /&gt;
    -- scan through values and remove_values and create output results&lt;br /&gt;
	local results = {}&lt;br /&gt;
    scanValues(values,results,localArgs,dep_values)&lt;br /&gt;
    scanValues(remove_values,results,localArgs)&lt;br /&gt;
	return table.concat(results)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Hike395</name></author>
	</entry>
</feed>