<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="uk">
		<id>http://wiki.isofts.kiev.ua/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AAuthority_control</id>
		<title>Модуль:Authority control - Історія редагувань</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.isofts.kiev.ua/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AAuthority_control"/>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Authority_control&amp;action=history"/>
		<updated>2026-04-05T07:43:55Z</updated>
		<subtitle>Історія редагувань цієї сторінки в вікі</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Authority_control&amp;diff=649&amp;oldid=prev</id>
		<title>Kolk: Імпортовано 1 версія</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Authority_control&amp;diff=649&amp;oldid=prev"/>
				<updated>2016-11-24T15:22:54Z</updated>
		
		<summary type="html">&lt;p&gt;Імпортовано 1 версія&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Попередня версія&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версія за 15:22, 24 листопада 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Немає відмінностей)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Authority_control&amp;diff=648&amp;oldid=prev</id>
		<title>Andy M. Wang: uncontroversial sync to sandbox per edit request</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Authority_control&amp;diff=648&amp;oldid=prev"/>
				<updated>2016-06-03T04:30:37Z</updated>
		
		<summary type="html">&lt;p&gt;uncontroversial sync to sandbox per &lt;a href=&quot;/index.php/%D0%A1%D0%BF%D0%B5%D1%86%D1%96%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0:%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F/723452384&quot; title=&quot;Спеціальна:Изменения/723452384&quot;&gt;edit request&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Нова сторінка&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require('Module:No globals')&lt;br /&gt;
&lt;br /&gt;
local function getCatForId( id )&lt;br /&gt;
    local title = mw.title.getCurrentTitle()&lt;br /&gt;
    local namespace = title.namespace&lt;br /&gt;
    if namespace == 0 then&lt;br /&gt;
        return '[[Category:Wikipedia articles with ' .. id .. ' identifiers]]'&lt;br /&gt;
    elseif namespace == 2 and not title.isSubpage then&lt;br /&gt;
        return '[[Category:User pages with ' .. id .. ' identifiers]]'&lt;br /&gt;
    else&lt;br /&gt;
        return '[[Category:Miscellaneous pages with ' .. id .. ' identifiers]]'&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function viafLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[https://viaf.org/viaf/' .. id .. ' ' .. id .. ']' .. getCatForId( 'VIAF' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function kulturnavLink( id )&lt;br /&gt;
    return '[http://kulturnav.org/language/en/' .. id .. ' id]' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function sikartLink( id )&lt;br /&gt;
    return '[http://www.sikart.ch/KuenstlerInnen.aspx?id=' .. id .. '&amp;amp;lng=en ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function tlsLink( id )&lt;br /&gt;
	local id2 = mw.ustring.gsub(id, '%s', function(s) return mw.uri.encode(s, 'WIKI') end)&lt;br /&gt;
    return '[http://tls.theaterwissenschaft.ch/wiki/' .. id2 .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function ciniiLink( id )&lt;br /&gt;
    return '[http://ci.nii.ac.jp/author/' .. id .. '?l=en ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bneLink( id )&lt;br /&gt;
    return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&amp;amp;authority_id=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function uscongressLink( id )&lt;br /&gt;
    return '[http://bioguide.congress.gov/scripts/biodisplay.pl?index=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function narapersonLink( id )&lt;br /&gt;
    return '[https://research.archives.gov/person/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function naraorganizationLink( id )&lt;br /&gt;
    return '[https://research.archives.gov/organization/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function botanistLink( id )&lt;br /&gt;
	local id2 = mw.ustring.gsub(id, '%s', function(s) return mw.uri.encode(s, 'PATH') end)&lt;br /&gt;
    return '[http://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation=' .. id2 .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function mgpLink( id )&lt;br /&gt;
    -- TODO Implement some sanity checking regex&lt;br /&gt;
    return '[http://www.genealogy.ams.org/id.php?id=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function rslLink( id )&lt;br /&gt;
    -- TODO Implement some sanity checking regex&lt;br /&gt;
    return '[http://aleph.rsl.ru/F?func=find-b&amp;amp;find_code=SYS&amp;amp;adjacent=Y&amp;amp;local_base=RSL11&amp;amp;request=' .. id .. '&amp;amp;CON_LNG=ENG ' .. id .. ']'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function leonoreLink( id )&lt;br /&gt;
-- Identifiants allant de LH/1/1 à LH/2794/54 (légionnaires)&lt;br /&gt;
-- Identifiants allant de C/0/1 à C/0/84 (84 légionnaires célèbres)&lt;br /&gt;
-- Identifiants allant de 19800035/1/1 à 19800035/385/51670 (légionnaires décédés entre 1954 et 1977, et quelques dossiers de légionnaires décédés avant 1954)&lt;br /&gt;
    if not string.match( id, '^LH/%d%d?%d?%d?/%d%d?%d?$' ) and&lt;br /&gt;
       not string.match( id, '^C/0/%d%d?$' ) and&lt;br /&gt;
	   not string.match( id, '^19800035/%d%d?%d?%d?/%d%d?%d?%d?%d?$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.culture.gouv.fr/public/mistral/leonore_fr?ACTION=CHERCHER&amp;amp;FIELD_1=COTE&amp;amp;VALUE_1=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function sbnLink( id )&lt;br /&gt;
    if not string.match( id, '^IT\\ICCU\\%d%d%d%d%d%d%d%d%d%d$' ) and not string.match( id, '^IT\\ICCU\\%u%u[%d%u]%u\\%d%d%d%d%d%d$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid=' .. id .. ' ' .. id .. ']' .. getCatForId( 'SBN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function nkcLink( id )&lt;br /&gt;
	return '[http://aleph.nkp.cz/F/?func=find-c&amp;amp;local_base=aut&amp;amp;ccl_term=ica=' .. id .. '&amp;amp;CON_LNG=ENG ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function nclLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://aleweb.ncl.edu.tw/F/?func=accref&amp;amp;acc_sequence=' .. id .. '&amp;amp;CON_LNG=ENG ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function ndlLink( id )&lt;br /&gt;
	return '[http://id.ndl.go.jp/auth/ndlna/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function sudocLink( id )&lt;br /&gt;
    if not string.match( id, '^%d%d%d%d%d%d%d%d[%dxX]$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.idref.fr/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function hlsLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.hls-dhs-dss.ch/textes/f/F' .. id .. '.php ' .. id .. ']'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function lirLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.e-lir.ch/e-LIR___Lexicon.' .. id .. '.450.0.html ' .. id .. ']'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function splitLccn( id )&lt;br /&gt;
    if id:match( '^%l%l?%l?%d%d%d%d%d%d%d%d%d?%d?$' ) then&lt;br /&gt;
        id = id:gsub( '^(%l+)(%d+)(%d%d%d%d%d%d)$', '%1/%2/%3' )&lt;br /&gt;
    end&lt;br /&gt;
    if id:match( '^%l%l?%l?/%d%d%d?%d?/%d+$' ) then&lt;br /&gt;
         return mw.text.split( id, '/' )&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function append(str, c, length)&lt;br /&gt;
    while str:len() &amp;lt; length do&lt;br /&gt;
        str = c .. str&lt;br /&gt;
    end&lt;br /&gt;
    return str&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function lccnLink( id )&lt;br /&gt;
    local parts = splitLccn( id )&lt;br /&gt;
    if not parts then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local lccnType = parts[1] ~= 'sh' and 'names' or 'subjects'&lt;br /&gt;
    id = parts[1] .. parts[2] .. append( parts[3], '0', 6 )&lt;br /&gt;
    return '[http://id.loc.gov/authorities/' .. lccnType .. '/' .. id .. ' ' .. id .. ']' .. getCatForId( 'LCCN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function mbLink( id )&lt;br /&gt;
    -- TODO Implement some sanity checking regex&lt;br /&gt;
    return '[//musicbrainz.org/artist/' .. id .. ' ' .. id .. ']' .. getCatForId( 'MusicBrainz' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Returns the ISNI check digit isni must be a string where the 15 first elements are digits&lt;br /&gt;
local function getIsniCheckDigit( isni )&lt;br /&gt;
    local total = 0&lt;br /&gt;
    for i = 1, 15 do&lt;br /&gt;
        local digit = isni:byte( i ) - 48 --Get integer value&lt;br /&gt;
        total = (total + digit) * 2&lt;br /&gt;
    end&lt;br /&gt;
    local remainder = total % 11&lt;br /&gt;
    local result = (12 - remainder) % 11&lt;br /&gt;
    if result == 10 then&lt;br /&gt;
        return &amp;quot;X&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    return tostring( result )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Validate ISNI (and ORCID) and retuns it as a 16 characters string or returns false if it's invalid&lt;br /&gt;
--See http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier&lt;br /&gt;
local function validateIsni( id )&lt;br /&gt;
    id = id:gsub( '[ %-]', '' ):upper()&lt;br /&gt;
    if not id:match( '^%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d[%dX]$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    if getIsniCheckDigit( id ) ~= string.char( id:byte( 16 ) ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isniLink( id )&lt;br /&gt;
    id = validateIsni( id )&lt;br /&gt;
    if not id then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://isni.org/isni/' .. id .. ' ' .. id:sub( 1, 4 ) .. ' ' .. id:sub( 5, 8 ) .. ' '  .. id:sub( 9, 12 ) .. ' '  .. id:sub( 13, 16 ) .. ']' .. getCatForId( 'ISNI' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function orcidLink( id )&lt;br /&gt;
    id = validateIsni( id )&lt;br /&gt;
    if not id then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    id = id:sub( 1, 4 ) .. '-' .. id:sub( 5, 8 ) .. '-'  .. id:sub( 9, 12 ) .. '-'  .. id:sub( 13, 16 )&lt;br /&gt;
    return '[https://orcid.org/' .. id .. ' ' .. id .. ']' .. getCatForId( 'ORCID' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function gndLink( id )&lt;br /&gt;
    return '[http://d-nb.info/gnd/' .. id .. ' ' .. id .. ']' .. getCatForId( 'GND' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function selibrLink( id )&lt;br /&gt;
	if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[//libris.kb.se/auth/' .. id .. ' ' .. id .. ']' .. getCatForId( 'SELIBR' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bnfLink( id )&lt;br /&gt;
    --Add cb prefix if it has been removed&lt;br /&gt;
    if not string.match( id, '^cb.+$' ) then&lt;br /&gt;
        id = 'cb' .. id&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return '[http://catalogue.bnf.fr/ark:/12148/' .. id .. ' ' .. id .. '] [http://data.bnf.fr/ark:/12148/' .. id .. ' (data)]' .. getCatForId( 'BNF' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bpnLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.biografischportaal.nl/en/persoon/' .. id .. ' ' .. id .. ']' .. getCatForId( 'BPN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function ridLink( id )&lt;br /&gt;
    return '[http://www.researcherid.com/rid/' .. id .. ' ' .. id .. ']' .. getCatForId( 'RID' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bibsysLink( id )&lt;br /&gt;
    return '[http://ask.bibsys.no/ask/action/result?cmd=&amp;amp;kilde=biblio&amp;amp;cql=bs.autid+%3D+' .. id .. '&amp;amp;feltselect=bs.autid ' .. id .. ']' .. getCatForId( 'BIBSYS' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function ulanLink( id )&lt;br /&gt;
    return '[//www.getty.edu/vow/ULANFullDisplay?find=&amp;amp;role=&amp;amp;nation=&amp;amp;subjectid=' .. id .. ' ' .. id .. ']' .. getCatForId( 'ULAN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function nlaLink( id )&lt;br /&gt;
	return '[//nla.gov.au/anbd.aut-an' .. id .. ' ' .. id .. ']' .. getCatForId( 'NLA' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function rkdartistsLink( id )&lt;br /&gt;
	return '[https://rkd.nl/en/explore/artists/' .. id .. ' ' .. id .. ']' .. getCatForId( 'RKDartists' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getIdsFromWikidata( item, property )&lt;br /&gt;
    local ids = {}&lt;br /&gt;
    if not item.claims[property] then&lt;br /&gt;
        return ids&lt;br /&gt;
    end&lt;br /&gt;
    for _, statement in pairs( item:getBestStatements( property )) do&lt;br /&gt;
		if statement.mainsnak.datavalue then&lt;br /&gt;
			table.insert( ids, statement.mainsnak.datavalue.value )&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 matchesWikidataRequirements( item, reqs )&lt;br /&gt;
    for _, group in pairs( reqs ) do&lt;br /&gt;
        local property = 'p' .. group[1]&lt;br /&gt;
        local qid = group[2]&lt;br /&gt;
        if item.claims[property] ~= nil then&lt;br /&gt;
            for _, statement in pairs ( item.claims[property] ) do&lt;br /&gt;
            	if statement.mainsnak.datavalue ~= nil then&lt;br /&gt;
	                if statement.mainsnak.datavalue.value['numeric-id'] == qid then&lt;br /&gt;
    	                return true&lt;br /&gt;
        	        end&lt;br /&gt;
        	    end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function createRow( id, label, rawValue, link, withUid )&lt;br /&gt;
    if link then&lt;br /&gt;
        if withUid then&lt;br /&gt;
            return '*&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;' .. label .. ' &amp;lt;span class=&amp;quot;uid&amp;quot;&amp;gt;' .. link .. '&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;\n'&lt;br /&gt;
        else&lt;br /&gt;
            return '*&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;' .. label .. ' ' .. link .. '&amp;lt;/span&amp;gt;\n'&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        return '* &amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;The ' .. id .. ' id ' .. rawValue .. ' is not valid.&amp;lt;/span&amp;gt;[[Category:Wikipedia articles with faulty authority control identifiers (' .. id .. ')]]\n'&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--In this order: name of the parameter, label, propertyId in Wikidata, formatting function&lt;br /&gt;
local conf = {&lt;br /&gt;
    { 'VIAF', '[[Virtual International Authority File|VIAF]]', 214, viafLink },&lt;br /&gt;
    { 'LCCN', '[[Library of Congress Control Number|LCCN]]', 244, lccnLink },&lt;br /&gt;
    { 'ISNI', '[[International Standard Name Identifier|ISNI]]', 213, isniLink },&lt;br /&gt;
    { 'ORCID', '[[ORCID]]', 496, orcidLink },&lt;br /&gt;
    { 'GND', '[[Integrated Authority File|GND]]', 227, gndLink },&lt;br /&gt;
    { 'SELIBR', '[[LIBRIS|SELIBR]]', 906, selibrLink },&lt;br /&gt;
    { 'SUDOC', '[[Système universitaire de documentation|SUDOC]]', 269, sudocLink },&lt;br /&gt;
    { 'BNF', '[[Bibliothèque nationale de France|BNF]]', 268, bnfLink },&lt;br /&gt;
    { 'BPN', '[[Biografisch Portaal|BPN]]', 651, bpnLink },&lt;br /&gt;
    { 'RID', '[[ResearcherID]]', 1053, ridLink },&lt;br /&gt;
    { 'BIBSYS', '[[BIBSYS]]', 1015, bibsysLink },&lt;br /&gt;
    { 'ULAN', '[[Union List of Artist Names|ULAN]]', 245, ulanLink },&lt;br /&gt;
    { 'HDS', '[[Historical Dictionary of Switzerland|HDS]]', 902, hlsLink },&lt;br /&gt;
    { 'LIR', '[[Historical Dictionary of Switzerland#Lexicon_Istoric_Retic|LIR]]', 886, lirLink },&lt;br /&gt;
    { 'MBA', '[[MusicBrainz]]', 434, mbLink },&lt;br /&gt;
    { 'MGP', '[[Mathematics Genealogy Project|MGP]]', 549, mgpLink },&lt;br /&gt;
    { 'NLA', '[[National Library of Australia|NLA]]', 409, nlaLink },&lt;br /&gt;
    { 'NDL', '[[National Diet Library|NDL]]', 349, ndlLink },&lt;br /&gt;
    { 'NCL', '[[National Central Library|NCL]]', 1048, nclLink },&lt;br /&gt;
    { 'NKC', '[[National Library of the Czech Republic|NKC]]', 691, nkcLink },&lt;br /&gt;
    { 'Léonore', '[[Base Léonore|Léonore]]', 640, leonoreLink },&lt;br /&gt;
    { 'SBN', '[[Istituto Centrale per il Catalogo Unico|ICCU]]', 396, sbnLink },&lt;br /&gt;
    { 'RLS', '[[Russian State Library|RLS]]', 947, rslLink },&lt;br /&gt;
    { 'Botanist', '[[Author citation (botany)|Botanist]]', 428, botanistLink },&lt;br /&gt;
    { 'NARA-person', '[[National Archives and Records Administration|NARA]]', 1222, narapersonLink },&lt;br /&gt;
    { 'NARA-organization', '[[National Archives and Records Administration|NARA]]', 1223, naraorganizationLink },&lt;br /&gt;
    { 'USCongress', '[[Biographical Directory of the United States Congress|US Congress]]', 1157, uscongressLink },&lt;br /&gt;
    { 'BNE', '[[Biblioteca Nacional de España|BNE]]', 950, bneLink },&lt;br /&gt;
    { 'CINII', '[[CiNii]]', 271, ciniiLink },&lt;br /&gt;
    { 'TLS', '[[Theaterlexikon der Schweiz|TLS]]', 1362, tlsLink },&lt;br /&gt;
    { 'SIKART', '[[SIKART]]', 781, sikartLink },&lt;br /&gt;
    { 'KULTURNAV', '[[KulturNav]]', 1248, kulturnavLink },&lt;br /&gt;
    { 'RKDartists', '[[Netherlands Institute for Art History#Online artist pages|RKD]]', 650, rkdartistsLink },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Check that the Wikidata item has this property--&amp;gt;value before adding it&lt;br /&gt;
local reqs = {}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.authorityControl( frame )&lt;br /&gt;
    local parentArgs = frame:getParent().args&lt;br /&gt;
    --Create rows&lt;br /&gt;
    local elements = {}&lt;br /&gt;
&lt;br /&gt;
    --redirect PND to GND&lt;br /&gt;
    if (parentArgs.GND == nil or parentArgs.GND == '') and parentArgs.PND ~= nil and parentArgs.PND ~= '' then&lt;br /&gt;
        parentArgs.GND = parentArgs.PND&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    --Wikidata fallback if requested&lt;br /&gt;
    local item = mw.wikibase.getEntityObject()&lt;br /&gt;
    if item ~= nil and item.claims ~= nil then&lt;br /&gt;
        for _, params in pairs( conf ) do&lt;br /&gt;
            if params[3] ~= 0 then&lt;br /&gt;
                local val = parentArgs[params[1]]&lt;br /&gt;
                if not val or val == '' then&lt;br /&gt;
                	local canUseWikidata = nil&lt;br /&gt;
                    if reqs[params[1]] ~= nil then&lt;br /&gt;
                        canUseWikidata = matchesWikidataRequirements( item, reqs[params[1]] )&lt;br /&gt;
                    else&lt;br /&gt;
                        canUseWikidata = true&lt;br /&gt;
                    end&lt;br /&gt;
                    if canUseWikidata then&lt;br /&gt;
                        local wikidataIds = getIdsFromWikidata( item, 'P' .. params[3] )&lt;br /&gt;
                        if wikidataIds[1] then&lt;br /&gt;
                            parentArgs[params[1]] = wikidataIds[1]&lt;br /&gt;
                        end&lt;br /&gt;
                    end&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    --Worldcat&lt;br /&gt;
    if parentArgs['WORLDCATID'] and parentArgs['WORLDCATID'] ~= '' then&lt;br /&gt;
        table.insert( elements, createRow( 'WORLDCATID', '', parentArgs['WORLDCATID'], '[//www.worldcat.org/identities/' .. parentArgs['WORLDCATID'] .. ' WorldCat Identities]', false ) ) --Validation?&lt;br /&gt;
    elseif parentArgs['VIAF'] and string.match( parentArgs['VIAF'], '^%d+$' ) then -- Hackishly copy the validation code; this should go away when we move to using P1793 and P1630&lt;br /&gt;
        table.insert( elements, createRow( 'VIAF', '', parentArgs['VIAF'], '[//www.worldcat.org/identities/containsVIAFID/' .. parentArgs['VIAF'] .. ' WorldCat Identities]', false ) )&lt;br /&gt;
    elseif parentArgs['LCCN'] and parentArgs['LCCN'] ~= '' then&lt;br /&gt;
        local lccnParts = splitLccn( parentArgs['LCCN'] )&lt;br /&gt;
        if lccnParts and lccnParts[1] ~= 'sh' then&lt;br /&gt;
            table.insert( elements, createRow( 'LCCN', '', parentArgs['LCCN'], '[//www.worldcat.org/identities/lccn-' .. lccnParts[1] .. lccnParts[2] .. '-' .. lccnParts[3] .. ' WorldCat Identities]', false ) )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    --Configured rows&lt;br /&gt;
    local rct = 0&lt;br /&gt;
    for k, params in pairs( conf ) do&lt;br /&gt;
        local val = parentArgs[params[1]]&lt;br /&gt;
        if val and val ~= '' then&lt;br /&gt;
            table.insert( elements, createRow( params[1], params[2] .. ':', val, params[4]( val ), true ) )&lt;br /&gt;
            rct = rct + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    local Navbox = require('Module:Navbox')&lt;br /&gt;
    local elementscats = ''&lt;br /&gt;
    if rct &amp;gt; 13 then&lt;br /&gt;
    	elementscats  = '[[Category:AC with ' .. rct .. ' elements]]'&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if #elements ~= 0 then&lt;br /&gt;
		return Navbox._navbox( {&lt;br /&gt;
			name  = 'Authority control',&lt;br /&gt;
			bodyclass = 'hlist',&lt;br /&gt;
			group1 = '[[Help:Authority control|Authority control]]' .. elementscats,&lt;br /&gt;
			list1 = table.concat( elements )&lt;br /&gt;
			} )&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Andy M. Wang</name></author>	</entry>

	</feed>