<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://twentyonewiki.info/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_for_unknown_parameters</id>
	<title>Module:Check for unknown parameters - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://twentyonewiki.info/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_for_unknown_parameters"/>
	<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;action=history"/>
	<updated>2026-04-06T01:15:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=7730&amp;oldid=prev</id>
		<title>Buburka Rinderbuy: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=7730&amp;oldid=prev"/>
		<updated>2024-08-18T02:11:36Z</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 22:11, 17 August 2024&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key twenizlx_mw1497-mw20_:diff::1.12:old-1910:rev-7730 --&gt;
&lt;/table&gt;</summary>
		<author><name>Buburka Rinderbuy</name></author>
	</entry>
	<entry>
		<id>https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=1910&amp;oldid=prev</id>
		<title>Buburka Rinderbuy: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=1910&amp;oldid=prev"/>
		<updated>2024-01-25T10:06:28Z</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:06, 25 January 2024&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key twenizlx_mw1497-mw20_:diff::1.12:old-1909:rev-1910 --&gt;
&lt;/table&gt;</summary>
		<author><name>Buburka Rinderbuy</name></author>
	</entry>
	<entry>
		<id>https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=1909&amp;oldid=prev</id>
		<title>Module:Check for unknown parameters&gt;BusterD: Changed protection settings for &quot;Module:Check for unknown parameters&quot;: Highly visible template; requested at WP:RfPP ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=1909&amp;oldid=prev"/>
		<updated>2022-02-21T05:24:13Z</updated>

		<summary type="html">&lt;p&gt;Changed protection settings for &amp;quot;&lt;a href=&quot;/index.php/Module:Check_for_unknown_parameters&quot; title=&quot;Module:Check for unknown parameters&quot;&gt;Module:Check for unknown parameters&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 template&lt;/a&gt;; requested at &lt;a href=&quot;/index.php?title=WP:RfPP&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:RfPP (page does not exist)&quot;&gt;WP:RfPP&lt;/a&gt; ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))&lt;/p&gt;
&lt;a href=&quot;https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;amp;diff=1909&amp;amp;oldid=7729&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Module:Check for unknown parameters&gt;BusterD</name></author>
	</entry>
	<entry>
		<id>https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=7729&amp;oldid=prev</id>
		<title>2001:E68:5DB6:4400:1CC9:6BF6:F04B:8803: Created page with &quot;-- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p...&quot;</title>
		<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Check_for_unknown_parameters&amp;diff=7729&amp;oldid=prev"/>
		<updated>2016-04-29T02:05:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p...&amp;quot;&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;
-- not 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;
	local args = frame.args&lt;br /&gt;
	local pargs = frame:getParent().args&lt;br /&gt;
	local ignoreblank = isnotempty(frame.args['ignoreblank'])&lt;br /&gt;
	local checkpos = isnotempty(frame.args['checkpositional'])&lt;br /&gt;
	local knownargs = {}&lt;br /&gt;
	local unknown = frame.args['unknown'] or 'Found _VALUE_, '&lt;br /&gt;
	local preview = frame.args['preview']&lt;br /&gt;
&lt;br /&gt;
	local res = {}&lt;br /&gt;
	local regexps = {}&lt;br /&gt;
	local comments = {}&lt;br /&gt;
	local commentstr = ''&lt;br /&gt;
	&lt;br /&gt;
	local ispreview = frame:preprocess( &amp;quot;{{REVISIONID}}&amp;quot; ) == &amp;quot;&amp;quot; and 1 or 0&lt;br /&gt;
&lt;br /&gt;
	-- create the list of known args, regular expressions, and the return string&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == 'number' then&lt;br /&gt;
			v = trim(v)&lt;br /&gt;
			knownargs[v] = 1&lt;br /&gt;
		elseif k:find('^regexp[1-9][0-9]*$') then&lt;br /&gt;
			table.insert(regexps, '^' .. v .. '$')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if isnotempty(preview) then &lt;br /&gt;
		preview = '&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; ' .. preview .. ' (this message is shown only in preview).&amp;lt;/div&amp;gt;'&lt;br /&gt;
	elseif preview == nil then&lt;br /&gt;
		preview = unknown&lt;br /&gt;
	end&lt;br /&gt;
	if ispreview == 1 then &lt;br /&gt;
		unknown = preview&lt;br /&gt;
		ignoreblank = false&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- adds one result to the output tables&lt;br /&gt;
	local function addresult(k)&lt;br /&gt;
		if k == '' 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;
			k = ' '&lt;br /&gt;
		end&lt;br /&gt;
		local r = unknown:gsub('_VALUE_', k)&lt;br /&gt;
		table.insert(res, r)&lt;br /&gt;
		table.insert(comments, '&amp;quot;' .. k .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- loop over the parent args, and make sure they are on the list&lt;br /&gt;
	for k, v in pairs(pargs) do&lt;br /&gt;
		if type(k) == 'string' and knownargs[k] == nil then&lt;br /&gt;
			local knownflag = false&lt;br /&gt;
			for i, regexp in ipairs(regexps) do&lt;br /&gt;
				if mw.ustring.match(k, regexp) then&lt;br /&gt;
					knownflag = true&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if not knownflag and ( not ignoreblank or isnotempty(v) )  then&lt;br /&gt;
				k = mw.ustring.gsub(k, '[^%w\-_ ]', '?')&lt;br /&gt;
				addresult(k)&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkpos and&lt;br /&gt;
			type(k) == 'number' and &lt;br /&gt;
			knownargs[tostring(k)] == nil and&lt;br /&gt;
			( not ignoreblank or isnotempty(v) )&lt;br /&gt;
		then&lt;br /&gt;
			addresult(k)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if #comments &amp;gt; 0 then&lt;br /&gt;
		commentstr = '&amp;lt;!-- Module:Check for unknown parameters results: ' ..&lt;br /&gt;
			table.concat(comments, ', ') .. '--&amp;gt;'&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(res) .. commentstr&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>2001:E68:5DB6:4400:1CC9:6BF6:F04B:8803</name></author>
	</entry>
</feed>