<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FJc86035%2F3</id>
	<title>Module:Sandbox/Jc86035/3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FJc86035%2F3"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Jc86035/3&amp;action=history"/>
	<updated>2026-05-27T23:24:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/Jc86035/3&amp;diff=145596&amp;oldid=prev</id>
		<title>imported&gt;Legoktm: Replace Module:No globals with require( &quot;strict&quot; )</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Jc86035/3&amp;diff=145596&amp;oldid=prev"/>
		<updated>2022-10-23T20:59:15Z</updated>

		<summary type="html">&lt;p&gt;Replace &lt;a href=&quot;/research/Module:No_globals&quot; title=&quot;Module:No globals&quot;&gt;Module:No globals&lt;/a&gt; with require( &amp;quot;strict&amp;quot; )&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;
&lt;br /&gt;
&lt;br /&gt;
local infobox = require(&amp;#039;Module:Infobox&amp;#039;).infobox&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function getProperty(entity, property, value)&lt;br /&gt;
	if entity and entity.claims then&lt;br /&gt;
		local claims = entity.claims[property]&lt;br /&gt;
		if claims and claims[1] then&lt;br /&gt;
			if value == &amp;#039;string&amp;#039; then&lt;br /&gt;
				return claims[1].mainsnak.datavalue.value, claims[1].qualifiers&lt;br /&gt;
			end&lt;br /&gt;
			return claims[1].mainsnak.datavalue.value.id, claims[1].qualifiers&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getQualifier(qualifiers, property, value)&lt;br /&gt;
	local claims = qualifiers[property]&lt;br /&gt;
	if claims and claims[1] then&lt;br /&gt;
		if value == &amp;#039;string&amp;#039; then&lt;br /&gt;
			return claims[1].datavalue.value&lt;br /&gt;
		end&lt;br /&gt;
		return claims[1].datavalue.value.id&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.test(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local entity = mw.wikibase.getEntity(args.qid)&lt;br /&gt;
	local data = {&lt;br /&gt;
		title = &amp;#039;Title&amp;#039;,&lt;br /&gt;
		aboveclass = &amp;#039;summary&amp;#039;,&lt;br /&gt;
		&lt;br /&gt;
		label3 = &amp;#039;Language&amp;#039;, data3 = args.language,&lt;br /&gt;
		&lt;br /&gt;
		label10 = &amp;#039;Artist&amp;#039;, data10 = args.artist,&lt;br /&gt;
		&lt;br /&gt;
		label20 = &amp;#039;ISWC&amp;#039;, data20 = (args.ISWC or args.iswc or getProperty(entity, &amp;#039;P1827&amp;#039;, &amp;#039;string&amp;#039;)),&lt;br /&gt;
		&lt;br /&gt;
		label21 = &amp;#039;ISRC&amp;#039;, data21 = (args.ISRC or args.isrc),&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local recording&lt;br /&gt;
	&lt;br /&gt;
	if not data.data10 or not data.data21 then&lt;br /&gt;
		local artist, qualifiers = getProperty(entity, &amp;#039;P175&amp;#039;)&lt;br /&gt;
		if artist then data.data10 = data.data10 or mw.wikibase.getLabel(artist) end&lt;br /&gt;
		local subject_of = getQualifier(qualifiers, &amp;#039;P805&amp;#039;)&lt;br /&gt;
		if subject_of then&lt;br /&gt;
			recording = mw.wikibase.getEntity(subject_of)&lt;br /&gt;
			local isrc = getProperty(recording, &amp;#039;P1243&amp;#039;, &amp;#039;string&amp;#039;)&lt;br /&gt;
			data.data21 = data.data21 or isrc&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return infobox(data)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Legoktm</name></author>
	</entry>
</feed>