<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki3d.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AAuthority_control%2Fdocumentation</id>
	<title>Module:Authority control/documentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki3d.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AAuthority_control%2Fdocumentation"/>
	<link rel="alternate" type="text/html" href="https://mediawiki3d.org/index.php?title=Module:Authority_control/documentation&amp;action=history"/>
	<updated>2026-04-26T22:29:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://mediawiki3d.org/index.php?title=Module:Authority_control/documentation&amp;diff=845&amp;oldid=prev</id>
		<title>Bawolff: 1 revision imported from :wikipedia:en:Module:Authority_control/documentation</title>
		<link rel="alternate" type="text/html" href="https://mediawiki3d.org/index.php?title=Module:Authority_control/documentation&amp;diff=845&amp;oldid=prev"/>
		<updated>2025-08-16T02:01:23Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported from &lt;a href=&quot;https://en.wikipedia.org/wiki/en:Module:Authority_control/documentation&quot; class=&quot;extiw&quot; title=&quot;wikipedia:en:Module:Authority control/documentation&quot;&gt;wikipedia:en:Module:Authority_control/documentation&lt;/a&gt;&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 02:01, 16 August 2025&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 wiki3d:diff:1.41:old-844:rev-845 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bawolff</name></author>
	</entry>
	<entry>
		<id>https://mediawiki3d.org/index.php?title=Module:Authority_control/documentation&amp;diff=844&amp;oldid=prev</id>
		<title>wikipedia:en&gt;TheDragonFire: Attempt to prevent crash</title>
		<link rel="alternate" type="text/html" href="https://mediawiki3d.org/index.php?title=Module:Authority_control/documentation&amp;diff=844&amp;oldid=prev"/>
		<updated>2025-05-08T16:49:31Z</updated>

		<summary type="html">&lt;p&gt;Attempt to prevent crash&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 p = {}&lt;br /&gt;
local frame = mw.getCurrentFrame()&lt;br /&gt;
local config_file = frame.args.config and frame.args.config~=&amp;#039;&amp;#039; and (&amp;#039;/&amp;#039; .. frame.args.config) or &amp;#039;&amp;#039;&lt;br /&gt;
local config = mw.loadData(&amp;#039;Module:Authority control/config&amp;#039; .. config_file)&lt;br /&gt;
local sandbox-- = &amp;#039;/&amp;#039; .. config.i18n.sandbox&lt;br /&gt;
local title = mw.title.getCurrentTitle()&lt;br /&gt;
local namespace = title.namespace&lt;br /&gt;
local testcases = title.subpageText == config.i18n.testcases&lt;br /&gt;
local makelink = require(config.i18n.ACmodule .. (sandbox or &amp;#039;&amp;#039;)).makelink&lt;br /&gt;
local lang = mw.getContentLanguage()&lt;br /&gt;
&lt;br /&gt;
local function needsAttention(sortkey)&lt;br /&gt;
	return &amp;#039;[[&amp;#039; .. config.i18n.category .. &amp;#039;:&amp;#039; .. config.i18n.attentioncat .. &amp;#039;|&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 category, redlinkcat = &amp;#039;&amp;#039;, &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;
		category = &amp;#039;[[&amp;#039; .. config.i18n.category .. &amp;#039;:&amp;#039; .. cat&lt;br /&gt;
		if sortkey then&lt;br /&gt;
			category = category .. &amp;#039;|&amp;#039; .. sortkey .. title.text&lt;br /&gt;
		end&lt;br /&gt;
		category = category .. &amp;#039;]]&amp;#039; .. redlinkcat&lt;br /&gt;
		return category&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 getstatement = function(id, propid, qualid)&lt;br /&gt;
	local statement = mw.wikibase.getBestStatements(&amp;#039;P&amp;#039; .. id, &amp;#039;P&amp;#039; .. propid)&lt;br /&gt;
	local value&lt;br /&gt;
	if statement and statement[1] and statement[1].mainsnak.datavalue and statement[1].mainsnak.datavalue.value.id then&lt;br /&gt;
		value = statement[1].mainsnak.datavalue.value.id&lt;br /&gt;
		local qual&lt;br /&gt;
		if qualid and statement[1].qualifiers[&amp;#039;P&amp;#039; .. qualid][1].datavalue.value then&lt;br /&gt;
			qual = statement[1].qualifiers[&amp;#039;P&amp;#039; .. qualid][1].datavalue.value&lt;br /&gt;
		end&lt;br /&gt;
		return value, qual&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
local getname = function(property)&lt;br /&gt;
	local name&lt;br /&gt;
	for _, propnameqid in ipairs(config.property_items) do&lt;br /&gt;
		name = getstatement(property, propnameqid)&lt;br /&gt;
		if name then break end&lt;br /&gt;
	end&lt;br /&gt;
	if name then&lt;br /&gt;
		return frame:expandTemplate{&lt;br /&gt;
			title = &amp;#039;Wikidata fallback link&amp;#039;,&lt;br /&gt;
			args = {name}&lt;br /&gt;
		}&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;
-- 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()&lt;br /&gt;
	local doc = &amp;#039;&amp;#039;&lt;br /&gt;
	local row = function(conf)&lt;br /&gt;
		local example_qid = getstatement(conf.property, 1855)&lt;br /&gt;
		local example = example_qid and frame:expandTemplate{&lt;br /&gt;
			title = &amp;#039;Flatlist&amp;#039;,&lt;br /&gt;
			args = {tostring(&lt;br /&gt;
				mw.html.create(&amp;#039;ul&amp;#039;)&lt;br /&gt;
				:node(makelink(conf, example_qid))&lt;br /&gt;
			)}&lt;br /&gt;
		} or &amp;#039;&amp;#039;&lt;br /&gt;
		local col1 = mw.html.create(&amp;#039;th&amp;#039;):attr(&amp;#039;data-sort-value&amp;#039;, conf.property)&lt;br /&gt;
		if conf.remark then&lt;br /&gt;
			col1:attr(&amp;#039;rowspan&amp;#039;,&amp;#039;2&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		col1:wikitext(frame:expandTemplate{title = &amp;#039;Wikidata property link&amp;#039;, args = {conf.property}})&lt;br /&gt;
		local row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:node(col1)&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;):wikitext(getname(conf.property)):done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;):css(&amp;#039;text-align&amp;#039;, &amp;#039;center&amp;#039;):wikitext(config.sections[conf.section].name):done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;):wikitext(example):allDone()&lt;br /&gt;
		local remark&lt;br /&gt;
		if conf.remark then&lt;br /&gt;
			remark = mw.html.create(&amp;#039;tr&amp;#039;):addClass(&amp;#039;expand-child&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;):attr(&amp;#039;colspan&amp;#039;, &amp;#039;3&amp;#039;)&lt;br /&gt;
					:tag(&amp;#039;span&amp;#039;):css(&amp;#039;font-weight&amp;#039;, &amp;#039;bold&amp;#039;):wikitext(&amp;#039;ℹ️ &amp;#039;):done()&lt;br /&gt;
					:wikitext(frame:preprocess{text = conf.remark})&lt;br /&gt;
				:allDone()&lt;br /&gt;
		end&lt;br /&gt;
		return row, remark&lt;br /&gt;
	end&lt;br /&gt;
	local header_row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):attr(&amp;#039;data-sort-type&amp;#039;, &amp;#039;number&amp;#039;):wikitext(config.i18n.WDproperty):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(lang:ucfirst(config.i18n.identifier)):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(config.i18n.Section):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(config.i18n.Appears_as):done()&lt;br /&gt;
	local doc = mw.html.create(&amp;#039;table&amp;#039;):addClass(&amp;#039;wikitable sortable&amp;#039;):node(header_row)&lt;br /&gt;
	for _, conf in pairs(config.config) do&lt;br /&gt;
		local row, remark = row(conf)&lt;br /&gt;
		doc:node(row):node(remark)&lt;br /&gt;
	end&lt;br /&gt;
	return tostring(doc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.whitelisttable()&lt;br /&gt;
	local header = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(config.i18n.Code):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(config.i18n.Topic):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(lang:ucfirst(config.i18n.identifiers)):done()&lt;br /&gt;
	local Table = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;wikitable&amp;#039;):addClass(&amp;#039;sortable&amp;#039;)&lt;br /&gt;
		:node(header)&lt;br /&gt;
	for code, wlist in pairs(config.whitelists) do&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;
		local row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(code):done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;):wikitext(&amp;#039;[[&amp;#039; .. mw.wikibase.getSitelink(&amp;#039;Q&amp;#039; .. wlist.topic) .. &amp;#039;]]&amp;#039;):done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;):wikitext(table.concat(plist,&amp;#039;, &amp;#039;)):done()&lt;br /&gt;
		Table:node(row)&lt;br /&gt;
	end&lt;br /&gt;
	return tostring(Table)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.sectiontable()&lt;br /&gt;
	local header = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(config.i18n.Section):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(config.i18n.Description):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(lang:ucfirst(config.i18n.identifiers)):done()&lt;br /&gt;
	local Table = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;wikitable&amp;#039;):addClass(&amp;#039;sortable&amp;#039;)&lt;br /&gt;
		:node(header)&lt;br /&gt;
	local plist = {}&lt;br /&gt;
	for n, _ in ipairs(config.sections) do&lt;br /&gt;
		plist[n] = {}&lt;br /&gt;
	end&lt;br /&gt;
	for _, id in pairs(config.config) do&lt;br /&gt;
		table.insert(plist[id.section], frame:expandTemplate{&lt;br /&gt;
			title=config.i18n.linktemplate,&lt;br /&gt;
			args={&amp;#039;P&amp;#039; .. id.property}&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
	for number, section in ipairs(config.sections) do&lt;br /&gt;
		local row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(number):done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;):wikitext(section.name):done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;):wikitext(table.concat(plist[number],&amp;#039;, &amp;#039;)):done()&lt;br /&gt;
		Table:node(row)&lt;br /&gt;
	end&lt;br /&gt;
	return tostring(Table)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.idproposal()&lt;br /&gt;
	local property = frame.args.property or &amp;#039;&amp;#039;&lt;br /&gt;
	local out = &amp;#039;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Wikidata property: &amp;#039; .. frame:expandTemplate{title=&amp;#039;Wikidata property link&amp;#039;, args={&amp;#039;P&amp;#039; .. property}} .. &amp;#039;&amp;lt;/li&amp;gt;&amp;#039;&lt;br /&gt;
	out = out .. &amp;#039;&amp;lt;li&amp;gt;Section: &amp;#039;&lt;br /&gt;
	local section = frame.args.section or &amp;#039;&amp;#039;&lt;br /&gt;
	if section~=&amp;#039;&amp;#039; then&lt;br /&gt;
		out = out .. config.sections[section].name .. &amp;#039; (&amp;#039; .. section .. &amp;#039;)&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		out = out .. &amp;#039;Not specified&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	out = out .. &amp;#039;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Link: &amp;#039;&lt;br /&gt;
	local link = frame.args.link or &amp;#039;&amp;#039;&lt;br /&gt;
	if link==&amp;#039;&amp;#039; then&lt;br /&gt;
		link = mw.wikibase.getBestStatements(&amp;#039;P&amp;#039; .. property, &amp;#039;P1630&amp;#039;) or &amp;#039;&amp;#039;&lt;br /&gt;
		link = link[1].mainsnak.datavalue.value&lt;br /&gt;
	end	&lt;br /&gt;
	if link~=&amp;#039;&amp;#039; then&lt;br /&gt;
		out = out .. &amp;#039;&amp;lt;code&amp;gt;&amp;#039; .. link .. &amp;#039;&amp;lt;/code&amp;gt;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		out = out .. &amp;#039;Not specified&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	out = out .. &amp;#039;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Label: &amp;#039;&lt;br /&gt;
	local label = frame.args.label or &amp;#039;&amp;#039;&lt;br /&gt;
	if label~=&amp;#039;&amp;#039; then&lt;br /&gt;
		out = out .. label&lt;br /&gt;
	else&lt;br /&gt;
		out = out .. &amp;#039;Not specified&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	out = out .. &amp;#039;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Example: &amp;#039;&lt;br /&gt;
	local example = mw.wikibase.getBestStatements(&amp;#039;P&amp;#039;..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;..property][1].datavalue.value&lt;br /&gt;
		example = frame:expandTemplate{title = &amp;#039;Hlist&amp;#039;, args = {makelink({[1]=&amp;#039;&amp;#039;, link=link, label=label}, example)}}&lt;br /&gt;
		out = out .. example&lt;br /&gt;
	else&lt;br /&gt;
		out = out .. &amp;#039;Not available&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	out = out .. &amp;#039;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;#039;&lt;br /&gt;
	return out&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia:en&gt;TheDragonFire</name></author>
	</entry>
</feed>