<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ykk.wiki:443/index.php?action=history&amp;feed=atom&amp;title=Module%3AAuthority_control</id>
	<title>Module:Authority control - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ykk.wiki:443/index.php?action=history&amp;feed=atom&amp;title=Module%3AAuthority_control"/>
	<link rel="alternate" type="text/html" href="https://ykk.wiki:443/index.php?title=Module:Authority_control&amp;action=history"/>
	<updated>2026-04-29T19:17:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://ykk.wiki:443/index.php?title=Module:Authority_control&amp;diff=35&amp;oldid=prev</id>
		<title>Aislynweaver: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://ykk.wiki:443/index.php?title=Module:Authority_control&amp;diff=35&amp;oldid=prev"/>
		<updated>2023-02-22T23:06:50Z</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 23:06, 22 February 2023&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 ykkwiki_db:diff:1.41:old-34:rev-35 --&gt;
&lt;/table&gt;</summary>
		<author><name>Aislynweaver</name></author>
	</entry>
	<entry>
		<id>https://ykk.wiki:443/index.php?title=Module:Authority_control&amp;diff=34&amp;oldid=prev</id>
		<title>wikipedia&gt;MSGJ: allow show=P214 to facilitate testing, fix doc table</title>
		<link rel="alternate" type="text/html" href="https://ykk.wiki:443/index.php?title=Module:Authority_control&amp;diff=34&amp;oldid=prev"/>
		<updated>2023-02-21T10:34:38Z</updated>

		<summary type="html">&lt;p&gt;allow show=P214 to facilitate testing, fix doc table&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local config = require(&amp;quot;Module:Authority control/config&amp;quot;)&lt;br /&gt;
local p = {}&lt;br /&gt;
local title = mw.title.getCurrentTitle()&lt;br /&gt;
local namespace = title.namespace&lt;br /&gt;
local testcases = (string.sub(title.subpageText,1,9) == &amp;#039;testcases&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local function needsAttention(sortkey)&lt;br /&gt;
	return &amp;#039;[[Category:Pages with authority control identifiers needing attention|&amp;#039; .. sortkey .. title.text .. &amp;#039;]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addCat(cat,sortkey)&lt;br /&gt;
	if cat and cat ~= &amp;#039;&amp;#039; and (namespace == 0 or namespace == 14 or testcases) then&lt;br /&gt;
		local redlinkcat = &amp;#039;&amp;#039;&lt;br /&gt;
		if testcases == false and mw.title.new(cat, 14).exists == false then&lt;br /&gt;
			redlinkcat = needsAttention(&amp;#039;N&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		if sortkey then&lt;br /&gt;
			cat = &amp;#039;[[Category:&amp;#039;..cat..&amp;#039;|&amp;#039; .. sortkey .. title.text .. &amp;#039;]]&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			cat = &amp;#039;[[Category:&amp;#039;..cat..&amp;#039;]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		cat = cat .. redlinkcat&lt;br /&gt;
		return cat&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getCatForId(id,faulty)&lt;br /&gt;
	local cat = &amp;#039;Articles with &amp;#039;&lt;br /&gt;
	if faulty then cat = cat .. &amp;#039;faulty &amp;#039; end&lt;br /&gt;
	cat = cat .. id .. &amp;#039; identifiers&amp;#039;&lt;br /&gt;
	return addCat(cat)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getIdsFromWikidata(qid,property)&lt;br /&gt;
	local function getquals(statement,qualid)&lt;br /&gt;
		if statement.qualifiers and statement.qualifiers[&amp;#039;P&amp;#039;..qualid] then&lt;br /&gt;
			return mw.wikibase.renderSnak(statement.qualifiers[&amp;#039;P&amp;#039;..qualid][1])&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local ids = {}&lt;br /&gt;
	if qid then&lt;br /&gt;
		for _, statement in ipairs(mw.wikibase.getBestStatements(qid,property)) do&lt;br /&gt;
			if statement.mainsnak.datavalue then&lt;br /&gt;
				local val = statement.mainsnak.datavalue.value&lt;br /&gt;
				if val then&lt;br /&gt;
					local namedas = getquals(statement,1810) or getquals(statement,742) or &amp;#039;&amp;#039;&lt;br /&gt;
					table.insert(ids,{id=val,name=namedas})&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ids&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makelink(conf,val,nextid,qid) --validate values and create a link&lt;br /&gt;
	local function tooltip(text,label)&lt;br /&gt;
		if label and label~=&amp;#039;&amp;#039; then&lt;br /&gt;
			return mw.getCurrentFrame():expandTemplate{title = &amp;quot;Tooltip&amp;quot;, args = {text,label}}		&lt;br /&gt;
		else&lt;br /&gt;
			return text&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local link&lt;br /&gt;
	if nextid==1 then&lt;br /&gt;
		if conf.prefix then&lt;br /&gt;
			link = &amp;#039;*&amp;#039; .. conf.prefix .. &amp;#039;\n**&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			link = &amp;#039;*&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		link = &amp;#039;\n**&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	local valid_value = false&lt;br /&gt;
	if conf.customlink then -- use function to validate and generate link&lt;br /&gt;
		if conf.customlink(val.id) then&lt;br /&gt;
			link = link .. conf.customlink(val.id)&lt;br /&gt;
			valid_value = true&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		if conf.pattern then -- use pattern to determine validity if defined&lt;br /&gt;
			valid_value = string.match(val.id,conf.pattern)&lt;br /&gt;
		elseif conf.patterns then&lt;br /&gt;
			for i = 1,#conf.patterns do&lt;br /&gt;
				valid_value = val.id:match(conf.patterns[i])&lt;br /&gt;
				if valid_value then break end&lt;br /&gt;
			end&lt;br /&gt;
		elseif conf.valid then -- otherwise use function to determine validity&lt;br /&gt;
			valid_value = conf.valid(val.id)&lt;br /&gt;
		else -- no validation possible&lt;br /&gt;
			valid_value = val.id&lt;br /&gt;
		end&lt;br /&gt;
		if valid_value then&lt;br /&gt;
			local newlink&lt;br /&gt;
			if not conf.label or nextid&amp;gt;1 then&lt;br /&gt;
				conf.label = tostring(nextid)&lt;br /&gt;
			end&lt;br /&gt;
			if conf.link then&lt;br /&gt;
				valid_value = valid_value:gsub(&amp;#039;%%&amp;#039;, &amp;#039;%%%%&amp;#039;)&lt;br /&gt;
				newlink = &amp;#039;[&amp;#039; .. mw.ustring.gsub(conf.link,&amp;#039;%$1&amp;#039;,valid_value) .. &amp;#039; &amp;#039; .. conf.label .. &amp;#039;]&amp;#039;&lt;br /&gt;
			else&lt;br /&gt;
				newlink = valid_value&lt;br /&gt;
			end&lt;br /&gt;
			link = link .. &amp;#039;&amp;lt;span class=&amp;quot;uid&amp;quot;&amp;gt;&amp;#039;..tooltip(newlink,val.name)..&amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if valid_value then&lt;br /&gt;
		link = link .. getCatForId(conf.category or conf[1])&lt;br /&gt;
	else&lt;br /&gt;
		--local preview = require(&amp;quot;Module:If preview&amp;quot;)&lt;br /&gt;
		local wdlink = qid and &amp;#039;[[:wikidata:&amp;#039; .. qid .. &amp;#039;#P&amp;#039; .. conf.property .. &amp;#039;]]&amp;#039; or &amp;#039;&amp;#039;&lt;br /&gt;
		link = link .. &amp;#039;[[File:345-409 Ambox warning centered.svg|20px|frameless|link=&amp;#039; .. wdlink .. &amp;#039;|The &amp;#039; .. conf[1] .. &amp;#039; id &amp;#039; .. val.id .. &amp;#039; is not valid.]]&amp;#039;&lt;br /&gt;
		if conf.errorcat then&lt;br /&gt;
			link = link .. addCat(conf.errorcat)&lt;br /&gt;
		else&lt;br /&gt;
			link = link .. getCatForId(conf.category or conf[1],true)&lt;br /&gt;
		end&lt;br /&gt;
		link = link .. addCat(&amp;#039;All articles with faulty authority control information&amp;#039;,conf[1])-- .. preview._warning({&amp;#039;The &amp;#039;..conf[1]..&amp;#039; id &amp;#039;..val..&amp;#039; is not valid.&amp;#039;})&lt;br /&gt;
	end&lt;br /&gt;
	return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                                   Main                                   ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
function p.authorityControl(frame)&lt;br /&gt;
	local function resolveQID(qid)&lt;br /&gt;
		if qid then&lt;br /&gt;
			qid = &amp;#039;Q&amp;#039;..mw.ustring.gsub(qid, &amp;#039;^[Qq]&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
			if mw.wikibase.isValidEntityId(qid) and mw.wikibase.entityExists(qid) then&lt;br /&gt;
				return qid&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local conf = config.config&lt;br /&gt;
	local parentArgs = frame:getParent().args&lt;br /&gt;
	local auxCats = &amp;#039;&amp;#039;&lt;br /&gt;
	local rct = false -- boolean to track if there are any links to be returned&lt;br /&gt;
	local qid,topic&lt;br /&gt;
	if namespace == 0 then&lt;br /&gt;
		qid = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	end&lt;br /&gt;
	if qid then -- article is connected to Wikidata item&lt;br /&gt;
		if parentArgs.qid and (parentArgs.qid ~= qid) then -- non-matching qid parameter&lt;br /&gt;
			auxCats = auxCats .. needsAttention(&amp;#039;D&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	else -- page is not connected to any Wikidata item&lt;br /&gt;
		qid = resolveQID(parentArgs.qid) -- check qid parameter if no wikidata item is connected&lt;br /&gt;
		if qid then -- qid parameter is valid, set topic to display&lt;br /&gt;
			topic = mw.wikibase.getLabel(qid)&lt;br /&gt;
			if topic and (mw.ustring.lower(title.subpageText) == mw.ustring.lower(topic)) then -- suppress topic display if subpagename equals topic up to case change&lt;br /&gt;
				topic = nil&lt;br /&gt;
			end&lt;br /&gt;
		elseif parentArgs.qid then -- invalid qid has been supplied, add to tracking cat&lt;br /&gt;
			auxCats = auxCats .. needsAttention(&amp;#039;Q&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local qids = {} -- setup any additional QIDs&lt;br /&gt;
	if parentArgs.additional and parentArgs.additional ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		for _,v in ipairs(mw.text.split(parentArgs.additional,&amp;quot;%s*,%s*&amp;quot;)) do&lt;br /&gt;
			v = resolveQID(v)&lt;br /&gt;
			if v == qid then -- duplicate of qid parameter&lt;br /&gt;
				auxCats = auxCats .. needsAttention(&amp;#039;R&amp;#039;)&lt;br /&gt;
			end&lt;br /&gt;
			table.insert(qids,v)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local sections = {}&lt;br /&gt;
	for _ = 1,#config.sectionNames + #qids do table.insert(sections,{}) end&lt;br /&gt;
	local qslink = &amp;#039;&amp;#039; -- setup link to add using QuickStatements&lt;br /&gt;
&lt;br /&gt;
	-- check which identifiers to show/suppress in template&lt;br /&gt;
	local show = {} -- setup list&lt;br /&gt;
	local showall = true&lt;br /&gt;
	local function stripP(pid)&lt;br /&gt;
		if pid:match(&amp;quot;^[Pp]%d+$&amp;quot;) then&lt;br /&gt;
			pid = mw.ustring.gsub(pid,&amp;#039;[Pp]&amp;#039;,&amp;#039;&amp;#039;) --strip P from property number&lt;br /&gt;
		end&lt;br /&gt;
		if pid:match(&amp;quot;^%d+$&amp;quot;) then&lt;br /&gt;
			pid = tonumber(pid)&lt;br /&gt;
		end&lt;br /&gt;
		return pid&lt;br /&gt;
	end&lt;br /&gt;
	local function addshowlist(list)&lt;br /&gt;
		if list and list ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			for _,v in ipairs(mw.text.split(string.lower(list),&amp;quot;%s*,%s*&amp;quot;)) do&lt;br /&gt;
				v = stripP(v)&lt;br /&gt;
				if type(v) == &amp;#039;string&amp;#039; then -- e.g. show=arts to use whitelist&lt;br /&gt;
					if config.whitelists[v] then&lt;br /&gt;
						for _,w in ipairs(config.whitelists[v].properties) do&lt;br /&gt;
							show[w] = true&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				else -- e.g. show=214 to show one particular property&lt;br /&gt;
					show[v] = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			showall = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	addshowlist(frame.args.show) -- check show= parameter on wrapper template&lt;br /&gt;
	addshowlist(parentArgs.show or parentArgs.country) -- check show parameter on article template&lt;br /&gt;
	if parentArgs.suppress then&lt;br /&gt;
		local suppresslist = mw.text.split(parentArgs.suppress,&amp;quot;%s*,%s*&amp;quot;) -- split parameter by comma&lt;br /&gt;
		for _,v in ipairs(suppresslist) do&lt;br /&gt;
			v=stripP(string.upper(v))&lt;br /&gt;
			show[v] = false&lt;br /&gt;
			auxCats = auxCats .. &amp;#039;[[Category:Articles with suppressed authority control identifiers]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local function makeSections(qid,addit)&lt;br /&gt;
		local tval = {}&lt;br /&gt;
		local function parameter_is_used(property)&lt;br /&gt;
			local used = false&lt;br /&gt;
			if property then&lt;br /&gt;
				if tval[property] then&lt;br /&gt;
					if tval[property][1] then&lt;br /&gt;
						used = true&lt;br /&gt;
					end&lt;br /&gt;
				elseif tval[property] == false then -- property has been manually suppressed&lt;br /&gt;
					used = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			return used&lt;br /&gt;
		end&lt;br /&gt;
		for _, params in ipairs(conf) do&lt;br /&gt;
			tval[params.property] = getIdsFromWikidata(qid, &amp;#039;P&amp;#039; .. params.property) -- setup table for values with property number as key&lt;br /&gt;
			local showb = true&lt;br /&gt;
			if (show[params.property] == nil) and (show[string.upper(params[1])] == nil ) then&lt;br /&gt;
				showb = showall -- if not specified then depends on showall&lt;br /&gt;
			elseif (show[params.property] == false) or (show[string.upper(params[1])] == false) then -- if either are false then id will be suppressed&lt;br /&gt;
				showb = false&lt;br /&gt;
			end&lt;br /&gt;
			if not showb then&lt;br /&gt;
				tval[params.property] = false -- indicates the identifier is suppressed&lt;br /&gt;
			elseif not addit then&lt;br /&gt;
				local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]&lt;br /&gt;
				if val and val ~= &amp;#039;&amp;#039; then -- add local parameter to list if not already in&lt;br /&gt;
					local bnew = true&lt;br /&gt;
					for _, w in pairs(tval[params.property]) do&lt;br /&gt;
						if val == w.id then&lt;br /&gt;
							bnew = false&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					if bnew then -- add new value to table&lt;br /&gt;
						if qid then&lt;br /&gt;
							qslink = qslink .. &amp;#039;%7C%7C&amp;#039; .. qid .. &amp;#039;%7CP&amp;#039; .. params.property .. &amp;#039;%7C%22&amp;#039; .. mw.uri.encode(val,&amp;quot;PATH&amp;quot;) .. &amp;#039;%22%7CS143%7CQ328&amp;#039;&lt;br /&gt;
						end&lt;br /&gt;
						table.insert(tval[params.property],{id=val,name=&amp;#039;&amp;#039;})&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			local suppress = false&lt;br /&gt;
			if params.suppressedbyproperty then&lt;br /&gt;
				for _,sc in ipairs(params.suppressedbyproperty) do&lt;br /&gt;
					if parameter_is_used(sc) then&lt;br /&gt;
						suppress = true&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if tval[params.property] ~= false and not suppress then&lt;br /&gt;
				local tlinks = {} -- setup table for links&lt;br /&gt;
				local nextIdVal = 1&lt;br /&gt;
				local row = &amp;#039;&amp;#039;&lt;br /&gt;
				for _,val in ipairs(tval[params.property]) do&lt;br /&gt;
					local link = makelink(params,val,nextIdVal,qid)&lt;br /&gt;
					row = row .. link&lt;br /&gt;
					table.insert(tlinks,link)&lt;br /&gt;
					nextIdVal = nextIdVal + 1&lt;br /&gt;
				end&lt;br /&gt;
				if nextIdVal&amp;gt;=2 then&lt;br /&gt;
					row = row .. &amp;#039;\n&amp;#039;&lt;br /&gt;
					table.insert(sections[addit or params.section],row)&lt;br /&gt;
					rct = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local function pencil(qid)&lt;br /&gt;
		if not qid then&lt;br /&gt;
			return &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		local args = { pid = &amp;#039;identifiers&amp;#039; } -- #target the list of identifiers&lt;br /&gt;
		args.qid = qid&lt;br /&gt;
		return require(&amp;#039;Module:EditAtWikidata&amp;#039;)._showMessage(args)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	makeSections(qid,false)&lt;br /&gt;
	for c = 1,#qids do&lt;br /&gt;
		makeSections(qids[c],#config.sectionNames+c)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--configure Navbox&lt;br /&gt;
	local outString = &amp;#039;&amp;#039;&lt;br /&gt;
	if rct then -- there is at least one link to display&lt;br /&gt;
		local Navbox = require(&amp;#039;Module:Navbox&amp;#039;)&lt;br /&gt;
		local sect,lastsect = 0,0&lt;br /&gt;
		local navboxArgs = {&lt;br /&gt;
			name  = &amp;#039;Authority control&amp;#039;,&lt;br /&gt;
			navboxclass = &amp;#039;authority-control&amp;#039;,&lt;br /&gt;
			bodyclass = &amp;#039;hlist&amp;#039;,&lt;br /&gt;
			state = parentArgs.state or &amp;#039;autocollapse&amp;#039;,&lt;br /&gt;
			navbar = &amp;#039;off&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
		for c=1,#config.sectionNames+#qids do&lt;br /&gt;
			if #sections[c] ~= 0 then -- section is non-empty&lt;br /&gt;
				sect = sect + 1&lt;br /&gt;
				lastsect = c&lt;br /&gt;
				local sectname&lt;br /&gt;
				if c &amp;lt;= #config.sectionNames then -- regular section&lt;br /&gt;
					sectname = config.sectionNames[c]&lt;br /&gt;
				else -- section from additional qid&lt;br /&gt;
					sectname = mw.wikibase.getLabel(qids[c-#config.sectionNames]) .. pencil(qids[c-#config.sectionNames])&lt;br /&gt;
				end&lt;br /&gt;
				navboxArgs[&amp;#039;group&amp;#039; .. c] = sectname&lt;br /&gt;
				navboxArgs[&amp;#039;list&amp;#039; .. c] = table.concat(sections[c])&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local aclink = &amp;#039;[[Help:Authority control|Authority control]]&amp;#039;&lt;br /&gt;
		if qslink ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			qslink = &amp;#039;&amp;lt;span class=&amp;quot;qs autoconfirmed-show&amp;quot;&amp;gt;&amp;amp;#32;[[File:Commons to Wikidata QuickStatements.svg|20px|link=https://quickstatements.toolforge.org/#/v1=&amp;#039; .. qslink .. &amp;#039;|Add values to Wikidata.]]&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		if topic then -- display in expanded form with topic&lt;br /&gt;
			navboxArgs.title = aclink .. &amp;#039; &amp;amp;ndash; &amp;#039; .. topic .. pencil(qid) .. qslink&lt;br /&gt;
		elseif sect == 1 then -- special display when only one section&lt;br /&gt;
			if lastsect == 1 or lastsect == 8 then -- no special label when only general or other IDs are present&lt;br /&gt;
				navboxArgs[&amp;#039;group&amp;#039; .. lastsect] = aclink .. pencil(qid) .. qslink&lt;br /&gt;
			elseif lastsect &amp;lt;= #config.sectionNames then -- other regular section&lt;br /&gt;
				navboxArgs[&amp;#039;group&amp;#039; .. lastsect] = aclink .. &amp;#039;: &amp;#039; .. config.sectionNames[lastsect] .. pencil(qid) .. qslink&lt;br /&gt;
			else -- section from additional qid&lt;br /&gt;
				navboxArgs[&amp;#039;group&amp;#039; .. lastsect] = aclink .. &amp;#039;: &amp;#039; .. navboxArgs[&amp;#039;group&amp;#039; .. lastsect] .. qslink&lt;br /&gt;
			end&lt;br /&gt;
		else -- add title to navbox&lt;br /&gt;
			navboxArgs.title = aclink .. pencil(qid) .. qslink&lt;br /&gt;
		end&lt;br /&gt;
		outString = Navbox._navbox(navboxArgs)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if parentArgs.state then&lt;br /&gt;
		if (parentArgs.state ~= &amp;#039;collapsed&amp;#039;) and (parentArgs.state ~= &amp;#039;expanded&amp;#039;) and (parentArgs.state ~= &amp;#039;autocollapse&amp;#039;) then --invalid state parameter&lt;br /&gt;
			auxCats = auxCats .. needsAttention(&amp;#039;S&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if testcases then&lt;br /&gt;
		auxCats = mw.ustring.gsub(auxCats, &amp;#039;(%[%[)(Category)&amp;#039;, &amp;#039;%1:%2&amp;#039;) --for easier checking&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--out&lt;br /&gt;
	outString = outString..auxCats&lt;br /&gt;
	if namespace ~= 0 then&lt;br /&gt;
		outString = mw.ustring.gsub(outString,&amp;#039;(%[%[)(Category:Articles)([^%|%]]+)%|?[^%|%]]*(%]%])&amp;#039;,&amp;#039;%1:%2%3%4&amp;#039;)&lt;br /&gt;
		outString = mw.ustring.gsub(outString,&amp;#039;(%[%[)(Category:All articles)([^%|%]]+)%|?[^%|%]]*(%]%])&amp;#039;,&amp;#039;%1:%2%3%4&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	local check = require(&amp;#039;Module:Check for unknown parameters&amp;#039;)._check&lt;br /&gt;
	local sortkey&lt;br /&gt;
	if namespace == 0 then&lt;br /&gt;
		sortkey = &amp;#039;*&amp;#039; .. title.text&lt;br /&gt;
	else&lt;br /&gt;
		sortkey = title.fullText&lt;br /&gt;
	end&lt;br /&gt;
	local tracking = check({&lt;br /&gt;
		[&amp;#039;unknown&amp;#039;]=&amp;#039;[[Category:Pages using authority control with parameters|&amp;#039; .. sortkey .. &amp;#039;]]&amp;#039;,&lt;br /&gt;
		[&amp;#039;preview&amp;#039;]=&amp;#039;Page using [[Template:Authority control]] with &amp;quot;_VALUE_&amp;quot;, please move this to Wikidata.&amp;#039;,&lt;br /&gt;
		&amp;#039;show&amp;#039;, &amp;#039;country&amp;#039;, &amp;#039;suppress&amp;#039;, &amp;#039;additional&amp;#039;, &amp;#039;qid&amp;#039;, &amp;#039;state&amp;#039;&lt;br /&gt;
		}, parentArgs)&lt;br /&gt;
	if namespace == 0 -- mainspace&lt;br /&gt;
		or namespace == 14 -- category&lt;br /&gt;
		or namespace == 2 -- user&lt;br /&gt;
		or namespace == 118 then -- draft&lt;br /&gt;
		outString = outString .. tracking&lt;br /&gt;
	end&lt;br /&gt;
	return outString&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Creates a human-readable standalone wikitable version of conf, and tracking categories with page counts, for use in the documentation&lt;br /&gt;
function p.docConfTable(frame)&lt;br /&gt;
	local count = frame.args.count or false&lt;br /&gt;
	local wikiTable = &amp;#039;&amp;lt;table class=&amp;quot;wikitable sortable&amp;quot;&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Code&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Identifier&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th data-sort-type=number&amp;gt;Wikidata property&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Section&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Appears as&amp;lt;/th&amp;gt;&amp;#039;&lt;br /&gt;
	if count then&lt;br /&gt;
	 	wikiTable = wikiTable .. &amp;#039;&amp;lt;th&amp;gt;[[:Category:Articles with authority control information|Articles]] ([[:Category:Articles with faulty authority control information|Faults]])&amp;lt;/th&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
 	wikiTable = wikiTable .. &amp;#039;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	local columns = 4 + (count and 1 or 0)&lt;br /&gt;
	local lang = mw.getContentLanguage()&lt;br /&gt;
	local a, P, f = 0, 0, 0 --cumulative sums&lt;br /&gt;
	local getlink = require(&amp;quot;Module:Wikidata table&amp;quot;)._getLink&lt;br /&gt;
	local function checkcat(category,label)&lt;br /&gt;
		local ret=&amp;#039;[[:Category:&amp;#039;..category..&amp;#039;|&amp;#039;..label..&amp;#039;]]&amp;#039;&lt;br /&gt;
		if mw.title.new(category,14).exists == false then&lt;br /&gt;
			ret = ret..&amp;#039; &amp;lt;span class=&amp;quot;plainlinks&amp;quot; style=&amp;quot;font-size:85%;&amp;quot;&amp;gt;&amp;amp;#91;[&amp;#039;..tostring(mw.uri.fullUrl(&amp;#039;Category:&amp;#039;..category,&amp;#039;action=edit&amp;amp;preload=Template:Authority_control/preload&amp;#039;))..&amp;#039; create]&amp;amp;#93;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		return ret&lt;br /&gt;
	end&lt;br /&gt;
	for _, conf in pairs(config.config) do&lt;br /&gt;
		local category = conf.category or conf[1]&lt;br /&gt;
		local articleCat = &amp;#039;Articles with &amp;#039;..category..&amp;#039; identifiers&amp;#039;&lt;br /&gt;
		local articleCount = mw.site.stats.pagesInCategory(articleCat,&amp;#039;pages&amp;#039;)&lt;br /&gt;
		local errorCat = conf.errorcat or &amp;#039;Articles with faulty &amp;#039;..(conf.category or conf[1])..&amp;#039; identifiers&amp;#039;&lt;br /&gt;
		local errorCount =  mw.site.stats.pagesInCategory(errorCat,&amp;#039;pages&amp;#039;)&lt;br /&gt;
		P = P + 1 --property count&lt;br /&gt;
		a = a + articleCount&lt;br /&gt;
		f = f + errorCount&lt;br /&gt;
		local example = mw.wikibase.getBestStatements(&amp;#039;P&amp;#039;..conf.property,&amp;#039;P1855&amp;#039;) or &amp;#039;&amp;#039;&lt;br /&gt;
		if example then&lt;br /&gt;
			example = example[1].qualifiers[&amp;#039;P&amp;#039;..conf.property][1].datavalue.value&lt;br /&gt;
			example = mw.getCurrentFrame():expandTemplate{title = &amp;quot;Hlist&amp;quot;, args = {&amp;#039;\n&amp;#039; .. makelink(conf,{id=example},1)}} .. &amp;#039;\n&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		local name = mw.wikibase.getBestStatements(&amp;#039;P&amp;#039;..conf.property,&amp;quot;P1629&amp;quot;)&lt;br /&gt;
		if name and name[1] and name[1].mainsnak.datavalue.value.id then&lt;br /&gt;
			name = getlink(name[1].mainsnak.datavalue.value.id)&lt;br /&gt;
		else&lt;br /&gt;
			name = &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		if conf.remark then&lt;br /&gt;
			wikiTable = wikiTable..&amp;#039;&amp;lt;tr&amp;gt;&amp;lt;td rowspan=2&amp;gt;&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			wikiTable = wikiTable..&amp;#039;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		wikiTable = wikiTable .. &amp;#039;[[&amp;#039; .. conf[1] .. &amp;#039; (identifier)&amp;#039; .. &amp;#039;|&amp;#039; .. conf[1] .. &amp;#039;]]&amp;lt;/td&amp;gt;&amp;#039;&lt;br /&gt;
		wikiTable = wikiTable..&amp;#039;&amp;lt;td&amp;gt;&amp;#039;.. name .. &amp;#039;&amp;lt;/td&amp;gt;&amp;#039; ..&lt;br /&gt;
			&amp;#039;&amp;lt;td data-sort-value=&amp;#039; .. conf.property .. &amp;#039;&amp;gt;&amp;#039; .. frame:expandTemplate{title=&amp;#039;Wikidata property link&amp;#039;,args={id=&amp;#039;f&amp;#039;,conf.property}} .. &amp;#039;&amp;lt;/td&amp;gt;&amp;#039; ..&lt;br /&gt;
			&amp;#039;&amp;lt;td&amp;gt;&amp;#039; .. config.sectionNames[conf.section]..&amp;#039;&amp;lt;/td&amp;gt;&amp;#039; ..&lt;br /&gt;
			&amp;#039;&amp;lt;td&amp;gt;&amp;#039; .. example .. &amp;#039;&amp;lt;/td&amp;gt;&amp;#039;&lt;br /&gt;
		if count then&lt;br /&gt;
			wikiTable = wikiTable .. &amp;#039;&amp;lt;td style=&amp;quot;text-align: right;&amp;quot;&amp;gt;&amp;#039;..checkcat(articleCat,lang:formatNum(articleCount))..&amp;#039; (&amp;#039;..checkcat(errorCat,errorCount)..&amp;#039;)&amp;lt;/td&amp;gt;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		wikiTable = wikiTable .. &amp;#039;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
		if conf.remark then&lt;br /&gt;
			wikiTable = wikiTable .. &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot; .. columns .. &amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Remarks:&amp;#039;&amp;#039;&amp;#039; &amp;quot;..conf.remark .. &amp;quot;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if count then&lt;br /&gt;
		wikiTable = wikiTable .. &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th style=&amp;quot;text-align: right;&amp;quot; colspan=&amp;#039; .. columns-1 .. &amp;#039;&amp;gt;Totals&amp;lt;/th&amp;gt;&amp;#039; ..&lt;br /&gt;
			&amp;#039;&amp;lt;th style=&amp;quot;text-align: right;&amp;quot;&amp;gt;&amp;#039; .. P .. &amp;#039;&amp;lt;/th&amp;gt;&amp;#039; ..&lt;br /&gt;
			&amp;#039;&amp;lt;th style=&amp;quot;text-align: right;&amp;quot;&amp;gt;&amp;#039; .. lang:formatNum(a) .. &amp;#039; ([[:Category:All articles with faulty authority control information|&amp;#039; .. f .. &amp;#039;]])&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	wikiTable = wikiTable .. &amp;#039;&amp;lt;/table&amp;gt;&amp;#039;&lt;br /&gt;
	return require(&amp;#039;Module:Suppress categories&amp;#039;).main(wikiTable)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.errorTable(frame)&lt;br /&gt;
	local Table = &amp;#039;&amp;lt;table class=&amp;quot;wikitable sortable&amp;quot;&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Code&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Wikidata property&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Faulty IDs&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;[[:Category:Articles with faulty authority control information|Tracking category]]&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	local f, P = 0, 0, 0 --cumulative sums&lt;br /&gt;
	for _, conf in pairs(config.config) do&lt;br /&gt;
		local category = conf.errorcat or &amp;#039;Articles with faulty &amp;#039;..(conf.category or conf[1])..&amp;#039; identifiers&amp;#039;&lt;br /&gt;
		local count =  mw.site.stats.pagesInCategory(category,&amp;#039;pages&amp;#039;)&lt;br /&gt;
		if count &amp;gt; 0 then&lt;br /&gt;
			P = P + 1&lt;br /&gt;
			f = f + count&lt;br /&gt;
			Table = Table..&amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;[[&amp;#039;..(conf.idlink or conf[1]..&amp;#039; (identifier)&amp;#039;)..&amp;#039;|&amp;#039;..conf[1]..&amp;#039;]]&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
				&amp;#039;&amp;lt;td&amp;gt;&amp;#039;..frame:expandTemplate{ title = &amp;#039;Wikidata property link&amp;#039;, args = { id = &amp;#039;f&amp;#039;, conf.property } } .. &amp;#039;&amp;lt;/td&amp;gt;&amp;#039;..&lt;br /&gt;
				&amp;#039;&amp;lt;td style=&amp;quot;text-align:center;&amp;quot;&amp;gt;&amp;#039;..tostring(count)..&amp;#039;&amp;lt;/td&amp;gt;&amp;#039;..&lt;br /&gt;
				&amp;#039;&amp;lt;td&amp;gt;[[:Category:&amp;#039;..category..&amp;#039;]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	Table = Table..&amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th colspan=2 style=&amp;quot;text-align: right;&amp;quot;&amp;gt;Totals&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
		&amp;#039;&amp;lt;th style=&amp;quot;text-align:center;&amp;quot;&amp;gt;&amp;#039; .. &amp;#039;[[:Category:All articles with faulty authority control information|&amp;#039; .. tostring(f) .. &amp;#039;]]&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
		&amp;#039;&amp;lt;th style=&amp;quot;text-align:center;&amp;quot;&amp;gt;&amp;#039;..tostring(P)..&amp;#039;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;#039;&lt;br /&gt;
	return Table&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.whitelisttable(frame)&lt;br /&gt;
	local Table = &amp;#039;&amp;lt;table class=&amp;quot;wikitable sortable&amp;quot;&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Code&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Topic&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Identifiers&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	for code, wlist in pairs(config.whitelists) do&lt;br /&gt;
		Table = Table .. &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;#039; .. code .. &amp;#039;&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
			&amp;#039;&amp;lt;td&amp;gt;[[&amp;#039; .. mw.wikibase.getSitelink(&amp;#039;Q&amp;#039; .. wlist.topic) .. &amp;#039;]]&amp;lt;/td&amp;gt;&amp;#039;&lt;br /&gt;
		local plist = {}&lt;br /&gt;
		for _, property in pairs(wlist.properties) do&lt;br /&gt;
			table.insert(plist,frame:expandTemplate{title=&amp;#039;Wikidata property link&amp;#039;, args={&amp;#039;P&amp;#039; .. property}})&lt;br /&gt;
		end&lt;br /&gt;
		Table = Table .. &amp;#039;&amp;lt;td&amp;gt;&amp;#039; .. table.concat(plist,&amp;#039;, &amp;#039;) .. &amp;#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	Table = Table .. &amp;#039;&amp;lt;/table&amp;gt;&amp;#039;&lt;br /&gt;
	return Table&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.sectiontable(frame)&lt;br /&gt;
	local Table = &amp;#039;&amp;lt;table class=&amp;quot;wikitable sortable&amp;quot;&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Section&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&amp;#039;..&lt;br /&gt;
	  &amp;#039;&amp;lt;th&amp;gt;Identifiers&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	for number,section in ipairs(config.sectionNames) do&lt;br /&gt;
		Table = Table .. &amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;#039; .. number .. &amp;#039;&amp;lt;/th&amp;gt;&amp;#039; ..	&amp;#039;&amp;lt;td&amp;gt;&amp;#039; .. section .. &amp;#039;&amp;lt;/td&amp;gt;&amp;#039;&lt;br /&gt;
		local plist = {}&lt;br /&gt;
		for _,id in pairs(config.config) do&lt;br /&gt;
			if id.section == number then&lt;br /&gt;
				table.insert(plist,frame:expandTemplate{title=&amp;#039;Wikidata property link&amp;#039;, args={&amp;#039;P&amp;#039; .. id.property}})&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		Table = Table .. &amp;#039;&amp;lt;td&amp;gt;&amp;#039; .. table.concat(plist,&amp;#039;, &amp;#039;) .. &amp;#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	Table = Table .. &amp;#039;&amp;lt;/table&amp;gt;&amp;#039;&lt;br /&gt;
	return Table&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Main/External Call for Pages with authority control identifiers&lt;br /&gt;
function p.autoDetect( frame )&lt;br /&gt;
	local function whichTOC( frame ) -- standardize TOC behavior via {{CatAutoTOC}}&lt;br /&gt;
		return frame:expandTemplate{ title = &amp;#039;CatAutoTOC&amp;#039;, args = { align = &amp;#039;center&amp;#039; } }&lt;br /&gt;
	end&lt;br /&gt;
	local ac_conf = require(&amp;#039;Module:Authority control/config&amp;#039;).config&lt;br /&gt;
	local rmCats = require(&amp;#039;Module:Suppress categories&amp;#039;).main&lt;br /&gt;
	--For use in [[Category:Articles with faulty authority control information]], i.e. on [[Category:Articles with faulty VIAF identifiers]]&lt;br /&gt;
	local function wpfaulty( frame, id )&lt;br /&gt;
		for _, conf in pairs(ac_conf) do&lt;br /&gt;
			if conf.category == id or conf[1] == id then&lt;br /&gt;
				local outString = frame:expandTemplate{ title = &amp;#039;Cat more&amp;#039;, args = {&amp;#039;Wikipedia:Authority control&amp;#039;, conf.idlink or conf[1]..&amp;#039; (identifier)&amp;#039;, &amp;#039;:d:Property:P&amp;#039;..conf.property} }&lt;br /&gt;
					.. frame:expandTemplate{ title = &amp;#039;Possibly empty category&amp;#039; }&lt;br /&gt;
					.. frame:expandTemplate{ title = &amp;#039;Wikipedia category&amp;#039;, args = { hidden = &amp;#039;yes&amp;#039;, tracking = &amp;#039;yes&amp;#039; } }&lt;br /&gt;
					.. frame:expandTemplate{ title = &amp;#039;Polluted category&amp;#039; }&lt;br /&gt;
					.. whichTOC( frame )&lt;br /&gt;
					.. &amp;#039;\nPages in this category should only be added by [[Module:Authority control]].&amp;#039;&lt;br /&gt;
					.. addCat(&amp;#039;Articles with &amp;#039;..id..&amp;#039; identifiers&amp;#039;)&lt;br /&gt;
					.. addCat(&amp;#039;Articles with faulty authority control information&amp;#039;,id)&lt;br /&gt;
				return outString&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	--For use in [[Category:Articles with authority control information]], i.e. on [[Category:Articles with VIAF identifiers]]&lt;br /&gt;
	local function wp(frame,id )&lt;br /&gt;
		for _, conf in pairs( ac_conf ) do&lt;br /&gt;
			if conf.category == id or conf[1] == id then&lt;br /&gt;
				local link = &amp;#039;[[&amp;#039; .. (conf.idlink or conf[1] .. &amp;#039; (identifier)&amp;#039;) .. &amp;#039;|&amp;#039; .. conf[1] .. &amp;#039;]]&amp;#039;&lt;br /&gt;
				local outString = frame:expandTemplate{ title = &amp;#039;Category explanation&amp;#039;, args = {&amp;#039;articles with &amp;#039;..link..&amp;#039; identifiers.&amp;#039;..&amp;#039; Please do not add [[Wikipedia:Categorization#Subcategorization|subcategories]].&amp;#039;} }&lt;br /&gt;
					.. frame:expandTemplate{ title = &amp;#039;Cat more&amp;#039;, args = {&amp;#039;Wikipedia:Authority control&amp;#039;, &amp;#039;:d:Property:P&amp;#039;..conf.property} }&lt;br /&gt;
					.. frame:expandTemplate{ title = &amp;#039;Possibly empty category&amp;#039; }&lt;br /&gt;
					.. frame:expandTemplate{ title = &amp;#039;Wikipedia category&amp;#039;, args = { hidden = &amp;#039;yes&amp;#039;, tracking = &amp;#039;yes&amp;#039; } }&lt;br /&gt;
					.. whichTOC( frame )&lt;br /&gt;
					.. &amp;#039;\nPages in this category should only be added by [[Module:Authority control]].&amp;#039;&lt;br /&gt;
					.. addCat(&amp;#039;Articles with authority control information&amp;#039;,id)&lt;br /&gt;
				return outString&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	if namespace == 14 then --cat space&lt;br /&gt;
		local wpfaultyID = mw.ustring.match(title.text, &amp;#039;Articles with faulty ([%w%.%- ]+) identifiers&amp;#039;)&lt;br /&gt;
		local wpID       = mw.ustring.match(title.text, &amp;#039;Articles with ([%w%.%- ]+) identifiers&amp;#039;)&lt;br /&gt;
		if wpfaultyID then&lt;br /&gt;
			return wpfaulty(frame,wpfaultyID)-- must be before wpID check, in case they both match&lt;br /&gt;
		elseif wpID then&lt;br /&gt;
			return wp(frame, wpID)-- to keep the regex simple&lt;br /&gt;
		else&lt;br /&gt;
			return needsAttention(&amp;#039;U&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;MSGJ</name></author>
	</entry>
</feed>