<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://www.wikonsult.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikidata%2FR%C3%A9f%C3%A9rences</id>
	<title>Module:Wikidata/Références - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://www.wikonsult.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikidata%2FR%C3%A9f%C3%A9rences"/>
	<link rel="alternate" type="text/html" href="https://www.wikonsult.org/index.php?title=Module:Wikidata/R%C3%A9f%C3%A9rences&amp;action=history"/>
	<updated>2026-08-09T17:10:17Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://www.wikonsult.org/index.php?title=Module:Wikidata/R%C3%A9f%C3%A9rences&amp;diff=177&amp;oldid=prev</id>
		<title>Yves.bertin : 1 révision importée</title>
		<link rel="alternate" type="text/html" href="https://www.wikonsult.org/index.php?title=Module:Wikidata/R%C3%A9f%C3%A9rences&amp;diff=177&amp;oldid=prev"/>
		<updated>2019-02-24T14:17:56Z</updated>

		<summary type="html">&lt;p&gt;1 révision importée&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version du 24 février 2019 à 14:17&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;fr&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Aucune différence)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yves.bertin</name></author>
		
	</entry>
	<entry>
		<id>https://www.wikonsult.org/index.php?title=Module:Wikidata/R%C3%A9f%C3%A9rences&amp;diff=176&amp;oldid=prev</id>
		<title>w.fr&gt;Lofhi : Annulation de la modification de Lofhi (d) cela corrige bien le problème, mais certains résultats générés manuellement dans la console de debug ne sont pas identiques...</title>
		<link rel="alternate" type="text/html" href="https://www.wikonsult.org/index.php?title=Module:Wikidata/R%C3%A9f%C3%A9rences&amp;diff=176&amp;oldid=prev"/>
		<updated>2019-02-19T19:30:47Z</updated>

		<summary type="html">&lt;p&gt;Annulation de la &lt;a href=&quot;/index.php?title=Sp%C3%A9cial:Diff/156879445&quot; title=&quot;Spécial:Diff/156879445&quot;&gt;modification&lt;/a&gt; de &lt;a href=&quot;/index.php?title=Sp%C3%A9cial:Contributions/Lofhi&quot; title=&quot;Spécial:Contributions/Lofhi&quot;&gt;Lofhi&lt;/a&gt; (&lt;a href=&quot;/index.php?title=Discussion_utilisateur:Lofhi&amp;amp;action=tinymceedit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Discussion utilisateur:Lofhi (page inexistante)&quot;&gt;d&lt;/a&gt;) cela corrige bien le problème, mais certains résultats générés manuellement dans la console de debug ne sont pas identiques...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local reference = {}&lt;br /&gt;
&lt;br /&gt;
local wd = require 'Module:Wikidata'&lt;br /&gt;
local refType = mw.loadData 'Module:Wikidata/Références/Types'&lt;br /&gt;
&lt;br /&gt;
local linguistic = require 'Module:Linguistique'&lt;br /&gt;
local cite = require 'Module:Biblio'&lt;br /&gt;
local langcodes = mw.loadData 'Module:Dictionnaire Wikidata/Codes langue'&lt;br /&gt;
&lt;br /&gt;
local function concatTables(t1,t2)&lt;br /&gt;
	local results = {}&lt;br /&gt;
	for _,e in pairs(t1) do&lt;br /&gt;
    	table.insert(results, e)&lt;br /&gt;
    end&lt;br /&gt;
    for _,e in pairs(t2) do&lt;br /&gt;
    	table.insert(results, e)&lt;br /&gt;
    end&lt;br /&gt;
    return results&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getStringStatementValues(entity, propertyId)&lt;br /&gt;
	local statements = entity:getBestStatements(propertyId)&lt;br /&gt;
	for i, statement in pairs(statements) do&lt;br /&gt;
		statements[i] = statement.mainsnak.datavalue.value&lt;br /&gt;
	end&lt;br /&gt;
	return statements&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getStringStatementValue(entity, propertyId)&lt;br /&gt;
	local statements = getStringStatementValues(entity, propertyId)&lt;br /&gt;
	if #statements &amp;gt; 0 then&lt;br /&gt;
		return statements[1]&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getDirectItemLang(workentity, property)&lt;br /&gt;
	local itemlangs = wd.getClaims{entity = workentity, property = property}&lt;br /&gt;
	if itemlangs ~= nil then&lt;br /&gt;
		return langcodes[wd.getNumericId(itemlangs[1].mainsnak)]&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function hasRole(statement, roleId)&lt;br /&gt;
	return statement.qualifiers and (&lt;br /&gt;
		statement.qualifiers['P518'] and wd.getId(statement.qualifiers['P518'][1]) == roleId&lt;br /&gt;
		or statement.qualifiers['P794'] and wd.getId(statement.qualifiers['P794'][1]) == roleId&lt;br /&gt;
	)&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
local function remove_same_isbn(isbns)&lt;br /&gt;
	-- input a table of isbns&lt;br /&gt;
	-- return a table of ibns without duplicate&lt;br /&gt;
	-- asked in https://fr.wikipedia.org/wiki/Discussion_mod%C3%A8le:Bibliographie#ISBN-10_et_ISBN-13&lt;br /&gt;
	local References = require( 'Module:Biblio/Références' )&lt;br /&gt;
	local result = {}&lt;br /&gt;
	for _, isbn1 in ipairs(isbns) do&lt;br /&gt;
		local same = false&lt;br /&gt;
		for index_isbn2, isbn2 in ipairs(result) do&lt;br /&gt;
			if  References.same_isbn(isbn1, isbn2) then&lt;br /&gt;
				if isbn2:gsub( '[ -]', '' ):len() == 13 then&lt;br /&gt;
					table.remove(result, index_isbn2)&lt;br /&gt;
					table.insert(result, isbn1)&lt;br /&gt;
				end&lt;br /&gt;
				same = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if not same then&lt;br /&gt;
			table.insert(result, isbn1)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function reference.citeitem(entityId, options)&lt;br /&gt;
	if not entityId then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local entity = wd.getEntity(entityId)&lt;br /&gt;
	if not entity then&lt;br /&gt;
		return 'invalid entity id'&lt;br /&gt;
	end&lt;br /&gt;
	if type( options ) ~= 'table' then&lt;br /&gt;
		options = {}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--work entity if it exists&lt;br /&gt;
	local workEntity = nil&lt;br /&gt;
	local workClaims = wd.getClaims{entity = entity, property = 'P629'} -- P629 : édition de&lt;br /&gt;
	if workClaims ~= nil then&lt;br /&gt;
		workEntity = wd.getEntity(wd.getMainId(workClaims[1]))&lt;br /&gt;
	end&lt;br /&gt;
	local journalEntity = nil&lt;br /&gt;
	local journalClaims = wd.getClaims{entity = entity, property = 'P1433'}&lt;br /&gt;
	if journalClaims ~= nil then&lt;br /&gt;
		journalEntity = wd.getEntity(wd.getMainId(journalClaims[1]))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local translator = wd.formatStatements{entity = entity, property = 'P655', defaultlink = '-'}&lt;br /&gt;
	local illustrator = wd.formatStatements{entity = entity, property = 'P110', defaultlink = '-'}&lt;br /&gt;
	local preface = ''&lt;br /&gt;
	local postface = ''&lt;br /&gt;
	local photographe = ''&lt;br /&gt;
	local authors = {}&lt;br /&gt;
	local are_director = {}&lt;br /&gt;
	local responsability = {}&lt;br /&gt;
	&lt;br /&gt;
	local author_statements = concatTables(entity:getBestStatements('P50'), entity:getBestStatements('P2093'))&lt;br /&gt;
	if next(author_statements) == nil and workEntity ~= nil then --Fallback to work&lt;br /&gt;
		author_statements = concatTables(workEntity:getBestStatements('P50'), workEntity:getBestStatements('P2093'))&lt;br /&gt;
	end&lt;br /&gt;
	for _, statement in pairs(author_statements) do&lt;br /&gt;
		local author = wd.formatStatement(statement, {defaultlink = '-'})&lt;br /&gt;
		local position = #authors + 1&lt;br /&gt;
		if statement.qualifiers and statement.qualifiers['P1545'] then&lt;br /&gt;
			position = tonumber(statement.qualifiers['P1545'][1].datavalue.value)&lt;br /&gt;
		end&lt;br /&gt;
		if statement.qualifiers and statement.qualifiers['P1932'] then&lt;br /&gt;
			statement.mainsnak = statement.qualifiers['P1932'][1]&lt;br /&gt;
		end&lt;br /&gt;
		authors[position] = wd.formatStatement(statement, {defaultlink = '-'})&lt;br /&gt;
		are_director[position] = ''&lt;br /&gt;
		--qualifier pour la responsabilité&lt;br /&gt;
		if statement.qualifiers and statement.qualifiers['P518'] then&lt;br /&gt;
			responsability[position] = wd.formatSnak(statement.qualifiers['P518'][1], {defaultlink = '-'})&lt;br /&gt;
		else&lt;br /&gt;
			responsability[position] = ''&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for _, statement in pairs(entity:getBestStatements('P98')) do&lt;br /&gt;
		table.insert(authors, wd.formatStatement(statement, {defaultlink = '-'}))&lt;br /&gt;
		table.insert(are_director, 'y')&lt;br /&gt;
		table.insert(responsability, '')&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for _, statement in pairs(entity:getBestStatements('P767')) do&lt;br /&gt;
		if hasRole(statement, 'Q670787') or hasRole(statement, 'Q19839393') then --préface/préfacier&lt;br /&gt;
			preface = wd.formatStatement(statement, {defaultlink = '-'})&lt;br /&gt;
		elseif hasRole(statement, 'Q7234272') then --postface&lt;br /&gt;
			postface = wd.formatStatement(statement, {defaultlink = '-'})&lt;br /&gt;
		elseif hasRole(statement, 'Q33231') or hasRole(statement, 'Q125191') then --photographe/photographie&lt;br /&gt;
			photographe = wd.formatStatement(statement, {defaultlink = '-'})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local isbns = getStringStatementValues(entity, 'P212')&lt;br /&gt;
	for _, isbn in pairs(getStringStatementValues(entity, 'P957')) do&lt;br /&gt;
		table.insert(isbns, isbn)&lt;br /&gt;
	end&lt;br /&gt;
	local issns = {}&lt;br /&gt;
	if journalEntity then&lt;br /&gt;
		issns = getStringStatementValues(journalEntity, 'P236')&lt;br /&gt;
	end&lt;br /&gt;
	if #issns == 0 then&lt;br /&gt;
		issns = getStringStatementValues(entity, 'P236')&lt;br /&gt;
	end&lt;br /&gt;
	local oclc = getStringStatementValue(entity, 'P243')&lt;br /&gt;
	local bnf = getStringStatementValue(entity, 'P268')&lt;br /&gt;
	local lccn = getStringStatementValue(entity, 'P1144')&lt;br /&gt;
	local dnb = getStringStatementValue(entity, 'P1292')&lt;br /&gt;
	local doi = getStringStatementValue(entity, 'P356')&lt;br /&gt;
	local pmid = getStringStatementValue(entity, 'P698')&lt;br /&gt;
	local jstor = getStringStatementValue(entity, 'P888')&lt;br /&gt;
	local bibcode = getStringStatementValue(entity, 'P1300')&lt;br /&gt;
	local arxiv = getStringStatementValue(entity, 'P818')&lt;br /&gt;
	local pmcid = getStringStatementValue(entity, 'P932')&lt;br /&gt;
	&lt;br /&gt;
	local ednumber = wd.formatStatements{entity = entity, property = 'P393'}&lt;br /&gt;
	local publisher = wd.formatStatements{entity = entity, property = 'P123', defaultlink = '-'}&lt;br /&gt;
	local journal = wd.formatStatements{entity = entity , property = 'P1433', defaultlink = '-'}&lt;br /&gt;
	--TODO fix local journalnumber = wd.formatStatements{entity = entity, property = 'P433'}&lt;br /&gt;
	--TODO fix local volume = wd.formatStatements{entity = entity, property = 'P478'}&lt;br /&gt;
&lt;br /&gt;
	local publishdate = wd.formatStatements{entity = entity, property = 'P577', linktopic = '-'}&lt;br /&gt;
	local publishplace = wd.formatStatements{entity = entity, property = 'P291', defaultlink = '-'}&lt;br /&gt;
&lt;br /&gt;
	--if no publisher, publication date or place, oclc or bnf: look for them in the item stored in P1433, misnamed here as  &amp;quot;journalEntity&amp;quot;&lt;br /&gt;
	if (not publisher) and journalEntity then&lt;br /&gt;
		publisher = wd.formatStatements{entity = journalEntity, property = &amp;quot;P123&amp;quot;, defaultlink = &amp;quot;P577&amp;quot;}&lt;br /&gt;
	end&lt;br /&gt;
	if (not publishdate) and journalEntity then&lt;br /&gt;
		publishdate = wd.formatStatements{entity = journalEntity, property = &amp;quot;P577&amp;quot;, linktopic = &amp;quot;P577&amp;quot;}&lt;br /&gt;
	end&lt;br /&gt;
	if (not publishplace) and journalEntity then&lt;br /&gt;
		publishplace = wd.formatStatements{entity = journalEntity, property = &amp;quot;P291&amp;quot;, defaultlink = &amp;quot;P577&amp;quot;}&lt;br /&gt;
	end&lt;br /&gt;
	if (not oclc) and journalEntity then&lt;br /&gt;
		oclc = wd.formatStatements{entity = journalEntity, property = &amp;quot;P243&amp;quot;, defaultlink = &amp;quot;P577&amp;quot;}&lt;br /&gt;
	end&lt;br /&gt;
	if (not bnf) and journalEntity then&lt;br /&gt;
		bnf = wd.formatStatements{entity = journalEntity, property = &amp;quot;P268&amp;quot;, defaultlink = &amp;quot;P577&amp;quot;}&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local pagenum = wd.formatStatements{entity = entity, property = 'P1104'}&lt;br /&gt;
	local title = wd.formatStatements{entity = entity, property = 'P1476', numval = 1 } or wd.getLabel(entity)&lt;br /&gt;
	local titlelink = wd.siteLink(entity)&lt;br /&gt;
	local subtitle = wd.formatStatements{entity = entity, property = 'P1680'}&lt;br /&gt;
	local url = getStringStatementValue(entity, 'P854') or getStringStatementValue(entity, 'P953')&lt;br /&gt;
	local wikisource = entity:getSitelink('frwikisource')&lt;br /&gt;
	local language = getDirectItemLang(entity, 'P407')&lt;br /&gt;
	if not language and journalEntity then&lt;br /&gt;
		language = getDirectItemLang(journalEntity, 'P407')&lt;br /&gt;
	end&lt;br /&gt;
	local originalLanguage = getDirectItemLang(entity, 'P364') --TODO: be clever? or getDirectItemLang(workEntity, 'P407') or getDirectItemLang(workEntity, 'P364')&lt;br /&gt;
	if not language or language == originalLanguage then&lt;br /&gt;
		originalLanguage = nil -- We are actually not sure if it has been translated from this language&lt;br /&gt;
	end&lt;br /&gt;
	local originalTitle = nil&lt;br /&gt;
	if workEntity and originalLanguage then&lt;br /&gt;
		originalTitle = wd.formatStatements{entity = workEntity, property = 'P1476', numval = 1 } or workEntity:getLabel(originalLanguage)&lt;br /&gt;
	end&lt;br /&gt;
	local page = getStringStatementValue(entity, 'P304')&lt;br /&gt;
	local numero = getStringStatementValue(entity, 'P433')&lt;br /&gt;
	local volume = getStringStatementValue(entity, 'P478')&lt;br /&gt;
&lt;br /&gt;
	-- choose relevant cite type&lt;br /&gt;
	local entitytype = wd.formatStatements{property = 'P31', entity = entity, numval = 1, displayformat = 'raw'}&lt;br /&gt;
	local funtype&lt;br /&gt;
		&lt;br /&gt;
		&lt;br /&gt;
	-- calcul du rendu du titre de l'ouvrage, éventuellement avec un lien vers l'article de l'ouvrage&lt;br /&gt;
&lt;br /&gt;
	-- pas de lien à générer si on est sur la page de l'ouvrage ou si l'élément cité est une édition de cet ouvrage&lt;br /&gt;
	if not ( wd.isPageOfQId(entityId) or &lt;br /&gt;
	   workEntity and wd.isPageOfQId(wd.entityId(workEntity)) )&lt;br /&gt;
	then&lt;br /&gt;
		if not titlelink and workEntity then&lt;br /&gt;
			-- si pas de lien, on peut essayer de voir si c'est l'édition de quelque chose d'autre&lt;br /&gt;
			titlelink = wd.siteLink(workEntity)&lt;br /&gt;
		end&lt;br /&gt;
		if title and titlelink then&lt;br /&gt;
			title = '[[' .. titlelink .. '|' .. title .. ']]'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- calcul du modèle à utiliser pour rendre l'élémént&lt;br /&gt;
	&lt;br /&gt;
	if (entitytype == 'Q3331189') then --book edition&lt;br /&gt;
		funtype = cite.ouvrage&lt;br /&gt;
		&lt;br /&gt;
		-- TODO : gérer l'édition et l'élément de l'oeuvre. &lt;br /&gt;
		&lt;br /&gt;
	elseif refType.isOuvrage[entitytype] then -- ouvrage sans édition connue ?&lt;br /&gt;
		&lt;br /&gt;
		-- TODO : gérer le cas ou un ouvrage est cité mais que Wikidata en connait des éditions.&lt;br /&gt;
		-- TODO : refuser ce genre d'items ?&lt;br /&gt;
		&lt;br /&gt;
		funtype = cite.ouvrage&lt;br /&gt;
		&lt;br /&gt;
	elseif refType.isArticle[entitytype] then -- article&lt;br /&gt;
		funtype = cite.article&lt;br /&gt;
	else -- default: output a very simple display&lt;br /&gt;
		local parameters = authors&lt;br /&gt;
		if title then &lt;br /&gt;
			 table.insert(parameters, '&amp;lt;i&amp;gt;' .. title .. '&amp;lt;/i&amp;gt;')&lt;br /&gt;
		end&lt;br /&gt;
		if publisher then&lt;br /&gt;
			table.insert(parameters, publisher)&lt;br /&gt;
		end&lt;br /&gt;
		if publishplace then&lt;br /&gt;
			table.insert(parameters, publishplace)&lt;br /&gt;
		end&lt;br /&gt;
		if publishdate then&lt;br /&gt;
			table.insert(parameters, publishdate)&lt;br /&gt;
		end&lt;br /&gt;
		if options['page'] then&lt;br /&gt;
			table.insert(parameters, 'p.' .. options['page'])&lt;br /&gt;
		end&lt;br /&gt;
		if options['accessdate'] then&lt;br /&gt;
			table.insert(parameters, 'consulté le ' .. options['accessdate'])&lt;br /&gt;
		end&lt;br /&gt;
		return linguistic.conj(parameters, 'comma')&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	local parameters = {&lt;br /&gt;
		['traducteur'] = translator,&lt;br /&gt;
		['illustrateur'] = illustrator,&lt;br /&gt;
		['préface'] = preface,&lt;br /&gt;
		['postface'] = postface,&lt;br /&gt;
		['photographe'] = photographe,&lt;br /&gt;
		['titre'] = title,&lt;br /&gt;
		['sous-titre'] = subtitle,&lt;br /&gt;
		--['volume'] = volume,&lt;br /&gt;
		['date'] = publishdate,&lt;br /&gt;
		['lieu'] = publishplace,&lt;br /&gt;
		['périodique'] = journal,&lt;br /&gt;
		--['numéro'] = journalnumber,&lt;br /&gt;
		[&amp;quot;numéro d'édition&amp;quot;] = ednumber,&lt;br /&gt;
		['éditeur'] = publisher,&lt;br /&gt;
		['pages totales'] = pagenum,&lt;br /&gt;
		['lire en ligne'] = url,&lt;br /&gt;
		['wikisource'] = wikisource,&lt;br /&gt;
		['oclc'] = oclc,&lt;br /&gt;
		['bnf'] = bnf,&lt;br /&gt;
		['lccn'] = lccn,&lt;br /&gt;
		['dnb'] = dnb,&lt;br /&gt;
		['doi'] = doi,&lt;br /&gt;
		['pmid'] = pmid,&lt;br /&gt;
		['jstor'] = jstor,&lt;br /&gt;
		['bibcode'] = bibcode,&lt;br /&gt;
		['arxiv'] = arxiv,&lt;br /&gt;
		['pmcid'] = pmcid,&lt;br /&gt;
		['langue'] = language,&lt;br /&gt;
		['langue originale'] = originalLanguage,&lt;br /&gt;
		['titre original'] = originalTitle,&lt;br /&gt;
		['page'] = page,&lt;br /&gt;
		['numéro'] = numero,&lt;br /&gt;
		['volume'] = volume,&lt;br /&gt;
		['plume'] = options['plume']&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	isbns = remove_same_isbn(isbns)&lt;br /&gt;
	for i, isbn in pairs(isbns) do&lt;br /&gt;
		parameters['isbn' .. i] = isbn&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for i, issn in pairs(issns) do&lt;br /&gt;
		parameters['issn' .. i] = issn&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- try to find if there is an author set in options&lt;br /&gt;
	local setAuthors = true&lt;br /&gt;
	for i=1, 15 do&lt;br /&gt;
		if options['auteur' .. i]  or options['directeur' .. i] or options['responsabilité' .. i] then&lt;br /&gt;
			setAuthors = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if setAuthors then&lt;br /&gt;
		for i, author in pairs(authors) do&lt;br /&gt;
			parameters['auteur' .. i] = author&lt;br /&gt;
			parameters['directeur' .. i] = are_director[i]&lt;br /&gt;
			parameters['responsabilité' .. i] = responsability[i]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for parameter, value in pairs(options) do&lt;br /&gt;
		if value == '-' then&lt;br /&gt;
			parameters[parameter] = ''&lt;br /&gt;
		else&lt;br /&gt;
			parameters[parameter] = value&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local val = funtype(parameters)&lt;br /&gt;
&lt;br /&gt;
	if val then&lt;br /&gt;
		return wd.addRefAnchor(wd.addLinkBack(val, entity), wd.entityId(entity))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return wd.formatError()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- pour tester&lt;br /&gt;
function reference.citeItem(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	return reference.citeitem(args[1], args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--used to test the duplicate isbn functions, use in the console like this&lt;br /&gt;
-- p.test()&lt;br /&gt;
reference.test = function()&lt;br /&gt;
	test_same_isbn()&lt;br /&gt;
	test_remove_same_isbn()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return reference&lt;/div&gt;</summary>
		<author><name>w.fr&gt;Lofhi</name></author>
		
	</entry>
</feed>