<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
	<id>https://enciclopedia.md/index.php?action=history&amp;feed=atom&amp;title=Modul%3AResolveEntityId</id>
	<title>Modul:ResolveEntityId - Revizia istoricului</title>
	<link rel="self" type="application/atom+xml" href="https://enciclopedia.md/index.php?action=history&amp;feed=atom&amp;title=Modul%3AResolveEntityId"/>
	<link rel="alternate" type="text/html" href="https://enciclopedia.md/index.php?title=Modul:ResolveEntityId&amp;action=history"/>
	<updated>2026-06-06T16:20:41Z</updated>
	<subtitle>Istoricul versiunilor pentru această pagină din wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://enciclopedia.md/index.php?title=Modul:ResolveEntityId&amp;diff=640&amp;oldid=prev</id>
		<title>Ana Vornic: Pagină nouă: local p = {}  function p._entityid(frame,id,alt) 	if type(id) == &#039;string&#039; then 		id = mw.ustring.upper(mw.ustring.sub(id,1,1))..mw.ustring.sub(id,2) 		if mw.ustring.match(id,&#039;^Q%d+$&#039;) then 			-- id is in the proper format for a Wikidata entity 			if mw.wikibase.isValidEntityId(id) then 				-- id is valid 				id = mw.wikibase.getEntity(id) 				if id then 					-- entity exists 					return id.id 				end 			end 		else 			id = mw.wikibase.getEntityIdForTitle(id) 			if id then...</title>
		<link rel="alternate" type="text/html" href="https://enciclopedia.md/index.php?title=Modul:ResolveEntityId&amp;diff=640&amp;oldid=prev"/>
		<updated>2024-07-19T15:50:01Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: local p = {}  function p._entityid(frame,id,alt) 	if type(id) == &amp;#039;string&amp;#039; then 		id = mw.ustring.upper(mw.ustring.sub(id,1,1))..mw.ustring.sub(id,2) 		if mw.ustring.match(id,&amp;#039;^Q%d+$&amp;#039;) then 			-- id is in the proper format for a Wikidata entity 			if mw.wikibase.isValidEntityId(id) then 				-- id is valid 				id = mw.wikibase.getEntity(id) 				if id then 					-- entity exists 					return id.id 				end 			end 		else 			id = mw.wikibase.getEntityIdForTitle(id) 			if id then...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pagină nouă&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._entityid(frame,id,alt)&lt;br /&gt;
	if type(id) == &amp;#039;string&amp;#039; then&lt;br /&gt;
		id = mw.ustring.upper(mw.ustring.sub(id,1,1))..mw.ustring.sub(id,2)&lt;br /&gt;
		if mw.ustring.match(id,&amp;#039;^Q%d+$&amp;#039;) then&lt;br /&gt;
			-- id is in the proper format for a Wikidata entity&lt;br /&gt;
			if mw.wikibase.isValidEntityId(id) then&lt;br /&gt;
				-- id is valid&lt;br /&gt;
				id = mw.wikibase.getEntity(id)&lt;br /&gt;
				if id then&lt;br /&gt;
					-- entity exists&lt;br /&gt;
					return id.id&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			id = mw.wikibase.getEntityIdForTitle(id)&lt;br /&gt;
			if id then&lt;br /&gt;
				-- id is a title that matches a Wikidata entity&lt;br /&gt;
				local instanceOf = mw.wikibase.getBestStatements(id, &amp;#039;P31&amp;#039;)[1]&lt;br /&gt;
				if instanceOf and instanceOf.mainsnak.datavalue.value.id ~= &amp;#039;Q4167410&amp;#039; then&lt;br /&gt;
					-- not disambiguation&lt;br /&gt;
					return mw.wikibase.getEntity(id).id&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return alt or nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.entityid(frame)&lt;br /&gt;
	return p._entityid(frame, frame.args[1], frame.args[2])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Ana Vornic</name></author>
	</entry>
</feed>