<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://producers.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACommons_link</id>
	<title>Module:Commons link - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://producers.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACommons_link"/>
	<link rel="alternate" type="text/html" href="https://producers.wiki/index.php?title=Module:Commons_link&amp;action=history"/>
	<updated>2026-05-02T03:54:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=5432&amp;oldid=prev</id>
		<title>Skritzer: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=5432&amp;oldid=prev"/>
		<updated>2020-12-16T19:17:41Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:17, 16 December 2020&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key my_wiki:diff::1.12:old-5431:rev-5432 --&gt;
&lt;/table&gt;</summary>
		<author><name>Skritzer</name></author>
		
	</entry>
	<entry>
		<id>https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=5431&amp;oldid=prev</id>
		<title>wikipedia&gt;Hike395: add fallback parameter</title>
		<link rel="alternate" type="text/html" href="https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=5431&amp;oldid=prev"/>
		<updated>2020-12-14T06:41:27Z</updated>

		<summary type="html">&lt;p&gt;add fallback parameter&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:41, 14 December 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l224&quot; &gt;Line 224:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 224:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   linktext = text to display in link&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   linktext = text to display in link&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   search = string to search for&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   search = string to search for&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--   fallback = string to search for if wikidata fails&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   lcfirst = lower case the first letter in linktext&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   lcfirst = lower case the first letter in linktext&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   qid = QID to lookup in wikidata (for testing only)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   qid = QID to lookup in wikidata (for testing only)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Returns:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Returns:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   formatted wikilink to Commons in specified namespace&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   formatted wikilink to Commons in specified namespace&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p._getCommons(namespace,default,linktext,search,lcfirst,qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p._getCommons(namespace,default,linktext,search&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,fallback&lt;/ins&gt;,lcfirst,qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local nsColon&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local nsColon&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if not namespace or namespace == &amp;quot;&amp;quot; then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if not namespace or namespace == &amp;quot;&amp;quot; then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l244&quot; &gt;Line 244:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 245:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	wp_title, wp_ns, qid = _getTitleQID(qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	wp_title, wp_ns, qid = _getTitleQID(qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- construct default result (which searches for title)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- construct default result (which searches for title)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local searchResult = &amp;quot;[[Commons:Special:Search/&amp;quot;..nsColon..wp_title..&amp;quot;|&amp;quot;.._lcfirst(lcfirst,linktext or wp_title)..&amp;quot;]]&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local searchResult = &amp;quot;[[Commons:Special:Search/&amp;quot;..nsColon..&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(fallback or &lt;/ins&gt;wp_title&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	searchResult = searchResult&lt;/ins&gt;..&amp;quot;|&amp;quot;.._lcfirst(lcfirst,linktext &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;or fallback &lt;/ins&gt;or wp_title)..&amp;quot;]]&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local commonsLink = nil&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local commonsLink = nil&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local consistent = true&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local consistent = true&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l277&quot; &gt;Line 277:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 279:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Returns:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Returns:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   formatted wikilink to Commons &amp;quot;best&amp;quot; landing page&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--   formatted wikilink to Commons &amp;quot;best&amp;quot; landing page&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p._getGalleryOrCategory(default,linktext,search,qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p._getGalleryOrCategory(default,linktext,search&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,fallback&lt;/ins&gt;,qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if default then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if default then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		return &amp;quot;[[Commons:&amp;quot;..default..&amp;quot;|&amp;quot;..(linktext or default)..&amp;quot;]]&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		return &amp;quot;[[Commons:&amp;quot;..default..&amp;quot;|&amp;quot;..(linktext or default)..&amp;quot;]]&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l287&quot; &gt;Line 287:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 289:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	wp_title, wp_ns, qid = _getTitleQID(qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	wp_title, wp_ns, qid = _getTitleQID(qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- construct default result (which searches for title)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- construct default result (which searches for title)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local searchResult = &amp;quot;[[Commons:Special:Search/&amp;quot;..wp_title..&amp;quot;|&amp;quot;..(linktext or wp_title)..&amp;quot;]]&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local searchResult = &amp;quot;[[Commons:Special:Search/&amp;quot;..&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(fallback or &lt;/ins&gt;wp_title&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	searchResult = searchResult&lt;/ins&gt;..&amp;quot;|&amp;quot;..(linktext &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;or fallback &lt;/ins&gt;or wp_title)..&amp;quot;]]&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local trackingCats = &amp;quot;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local trackingCats = &amp;quot;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local galleryLink, consistent, commonsSitelink = _lookupGallery(qid,true)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local galleryLink, consistent, commonsSitelink = _lookupGallery(qid,true)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l469&quot; &gt;Line 469:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 472:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p.getGallery(frame)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p.getGallery(frame)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	return p._getCommons(&amp;quot;&amp;quot;,args[1],args.linktext,args.search,args.lcfirst,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	return p._getCommons(&amp;quot;&amp;quot;,args[1],args.linktext,args.search&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,args.fallback&lt;/ins&gt;,args.lcfirst,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l475&quot; &gt;Line 475:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 478:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p.getCategory(frame)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p.getCategory(frame)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local retval = p._getCommons(&amp;quot;Category&amp;quot;,args[1],args.linktext,args.search,args.lcfirst,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local retval = p._getCommons(&amp;quot;Category&amp;quot;,args[1],args.linktext,args.search&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,args.fallback&lt;/ins&gt;,args.lcfirst,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if args.tracking then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if args.tracking then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		local default = nil&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		local default = nil&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l488&quot; &gt;Line 488:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 491:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p.getGalleryOrCategory(frame)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p.getGalleryOrCategory(frame)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local retval = p._getGalleryOrCategory(args[1],args.linktext,args.search,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local retval = p._getGalleryOrCategory(args[1],args.linktext,args.search&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,args.fallback&lt;/ins&gt;,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if args.tracking then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if args.tracking then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		retval = retval..p._tracking(args[1],true,true,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		retval = retval..p._tracking(args[1],true,true,args.qid)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>wikipedia&gt;Hike395</name></author>
		
	</entry>
	<entry>
		<id>https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=4928&amp;oldid=prev</id>
		<title>Skritzer: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=4928&amp;oldid=prev"/>
		<updated>2020-11-10T04:57:14Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:57, 10 November 2020&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key my_wiki:diff::1.12:old-4927:rev-4928 --&gt;
&lt;/table&gt;</summary>
		<author><name>Skritzer</name></author>
		
	</entry>
	<entry>
		<id>https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=4927&amp;oldid=prev</id>
		<title>wikipedia&gt;Hike395: fix tracking logic, allow tracking on getCategory()</title>
		<link rel="alternate" type="text/html" href="https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=4927&amp;oldid=prev"/>
		<updated>2020-09-29T11:37:17Z</updated>

		<summary type="html">&lt;p&gt;fix tracking logic, allow tracking on getCategory()&lt;/p&gt;
&lt;a href=&quot;https://producers.wiki/index.php?title=Module:Commons_link&amp;amp;diff=4927&amp;amp;oldid=2081&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>wikipedia&gt;Hike395</name></author>
		
	</entry>
	<entry>
		<id>https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=2081&amp;oldid=prev</id>
		<title>Skritzer: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=2081&amp;oldid=prev"/>
		<updated>2020-03-23T17:25:12Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:25, 23 March 2020&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key my_wiki:diff::1.12:old-2080:rev-2081 --&gt;
&lt;/table&gt;</summary>
		<author><name>Skritzer</name></author>
		
	</entry>
	<entry>
		<id>https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=2080&amp;oldid=prev</id>
		<title>wikipedia&gt;Hike395: add function to check whether article has any corresponding gallery or category</title>
		<link rel="alternate" type="text/html" href="https://producers.wiki/index.php?title=Module:Commons_link&amp;diff=2080&amp;oldid=prev"/>
		<updated>2020-03-20T06:54:51Z</updated>

		<summary type="html">&lt;p&gt;add function to check whether article has any corresponding gallery or category&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module to find commons galleries and categories based on wikidata entries&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Check if string is a valid QID&lt;br /&gt;
-- Argument: QID to check&lt;br /&gt;
-- Returns: valid (bool)&lt;br /&gt;
local function _validQID(qid)&lt;br /&gt;
	return qid and mw.ustring.find(qid,&amp;quot;^[Qq]%d+$&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Check if string is a valid wikidata property string&lt;br /&gt;
-- Argument: property string to check&lt;br /&gt;
-- Returns: valid (bool)&lt;br /&gt;
local function _validProp(prop)&lt;br /&gt;
	return prop and mw.ustring.find(prop,&amp;quot;^[Pp]%d+$&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Get title, namespace, and QID for current page&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   qid = testing only: get title of alternative page with QID=qid&lt;br /&gt;
-- Returns:&lt;br /&gt;
--   title, namespace (number), qid of current page (or test page)&lt;br /&gt;
local function _getTitleQID(qid)&lt;br /&gt;
	local titleObject = mw.title.getCurrentTitle()&lt;br /&gt;
	-- look up qid for current page (if not testing)&lt;br /&gt;
	if not _validQID(qid) then&lt;br /&gt;
		qid = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
		return titleObject.text, titleObject.namespace, qid&lt;br /&gt;
	end&lt;br /&gt;
	-- testing-only path: given a qid, determine title&lt;br /&gt;
	-- always use namespace from current page (to suppress tracking cat)&lt;br /&gt;
	qid = qid:upper()&lt;br /&gt;
	local title = mw.wikibase.getSitelink(qid) or &amp;quot;&amp;quot;&lt;br /&gt;
	-- strip any namespace from sitelink&lt;br /&gt;
	local firstColon = mw.ustring.find(title,':',1,true)&lt;br /&gt;
	if firstColon then&lt;br /&gt;
		title = mw.ustring.sub(title,firstColon+1)&lt;br /&gt;
	end&lt;br /&gt;
	return title, titleObject.namespace, qid&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Lookup Commons gallery in Wikidata&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   qid = QID of current article&lt;br /&gt;
--   fetch = whether to lookup Commons sitelink (bool)&lt;br /&gt;
--   commonsSitelink = default value for Commons sitelink&lt;br /&gt;
-- Returns:&lt;br /&gt;
--   categoryLink = name of Commons category, nil if nothing is found&lt;br /&gt;
--   consistent = multiple wikidata fields are examined: are they consistent?&lt;br /&gt;
--   commonsSitelink = commons sitelink for current article&lt;br /&gt;
local function _lookupGallery(qid,fetch,commonsSitelink)&lt;br /&gt;
	if not _validQID(qid) then&lt;br /&gt;
		return nil, true, nil&lt;br /&gt;
	end&lt;br /&gt;
	qid = qid:upper()&lt;br /&gt;
	local galleryLink = nil&lt;br /&gt;
	local consistent = true&lt;br /&gt;
	-- look up commons sitelink for article, use if not category&lt;br /&gt;
	if fetch then&lt;br /&gt;
		commonsSitelink = mw.wikibase.getSitelink(qid,&amp;quot;commonswiki&amp;quot;) or commonsSitelink&lt;br /&gt;
	end&lt;br /&gt;
	if commonsSitelink and mw.ustring.sub(commonsSitelink,1,9) ~= &amp;quot;Category:&amp;quot; then&lt;br /&gt;
		galleryLink = commonsSitelink&lt;br /&gt;
	end&lt;br /&gt;
	-- P935 is the &amp;quot;commons gallery&amp;quot; property for this article&lt;br /&gt;
	local P935 = mw.wikibase.getBestStatements(qid, &amp;quot;P935&amp;quot;)[1]&lt;br /&gt;
	if P935 and P935.mainsnak.datavalue then&lt;br /&gt;
		local gallery = P935.mainsnak.datavalue.value&lt;br /&gt;
		if galleryLink and galleryLink ~= gallery then&lt;br /&gt;
			consistent = false&lt;br /&gt;
		else&lt;br /&gt;
			galleryLink = gallery&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return galleryLink, consistent, commonsSitelink&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Find fallback category by looking up Commons sitelink of different page&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--    qid = QID for current article&lt;br /&gt;
--    property = property that refers to other article whose sitelink to return&lt;br /&gt;
-- Returns: either category-stripped name of article, or nil&lt;br /&gt;
local function _lookupFallback(qid,property)&lt;br /&gt;
	if not _validQID(qid) or not _validProp(property) then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	qid = qid:upper()&lt;br /&gt;
	property = property:upper()&lt;br /&gt;
	-- If property exists on current article, get value (other article qid)&lt;br /&gt;
	local value = mw.wikibase.getBestStatements(qid, property)[1]&lt;br /&gt;
	if value and value.mainsnak.datavalue and value.mainsnak.datavalue.value.id then&lt;br /&gt;
		-- Look up Commons sitelink of other article&lt;br /&gt;
		local sitelink = mw.wikibase.getSitelink(value.mainsnak.datavalue.value.id,&amp;quot;commonswiki&amp;quot;)&lt;br /&gt;
		-- Check to see if it starts with &amp;quot;Category:&amp;quot;. If so, strip it and return&lt;br /&gt;
		if sitelink and mw.ustring.sub(sitelink,1,9) == &amp;quot;Category:&amp;quot; then&lt;br /&gt;
			return mw.ustring.sub(sitelink,10)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Find Commons category by looking in wikidata&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   qid = QID of current article&lt;br /&gt;
--   fetch = whether to lookup Commons sitelink (bool)&lt;br /&gt;
--   commonsSitelink = default value for Commons sitelink&lt;br /&gt;
-- Returns:&lt;br /&gt;
--   categoryLink = name of Commons category, nil if nothing is found&lt;br /&gt;
--   consistent = multiple wikidata fields are examined: are they consistent?&lt;br /&gt;
--   commonsSitelink = commons sitelink for current article&lt;br /&gt;
local function _lookupCategory(qid, fetch, commonsSitelink)&lt;br /&gt;
	if not _validQID(qid) then&lt;br /&gt;
		return nil, true, nil&lt;br /&gt;
	end&lt;br /&gt;
	qid = qid:upper()&lt;br /&gt;
	local categoryLink = nil&lt;br /&gt;
	local consistent = true&lt;br /&gt;
	-- look up commons sitelink for article, use if starts with &amp;quot;Category:&amp;quot;&lt;br /&gt;
	if fetch then&lt;br /&gt;
		commonsSitelink = mw.wikibase.getSitelink(qid,&amp;quot;commonswiki&amp;quot;) or commonsSitelink&lt;br /&gt;
	end&lt;br /&gt;
	if commonsSitelink and mw.ustring.sub(commonsSitelink,1,9) == &amp;quot;Category:&amp;quot; then&lt;br /&gt;
		categoryLink = mw.ustring.sub(commonsSitelink,10)&lt;br /&gt;
	end&lt;br /&gt;
	-- P373 is the &amp;quot;commons category&amp;quot; property for this article&lt;br /&gt;
	local P373 = mw.wikibase.getBestStatements(qid, &amp;quot;P373&amp;quot;)[1]&lt;br /&gt;
	if P373 and P373.mainsnak.datavalue then&lt;br /&gt;
		P373 = P373.mainsnak.datavalue.value&lt;br /&gt;
		if categoryLink and categoryLink ~= P373 then&lt;br /&gt;
			consistent = false&lt;br /&gt;
			qid = nil  -- stop searching on inconsistent data&lt;br /&gt;
		else&lt;br /&gt;
			categoryLink = P373&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- P910 is the &amp;quot;topic's main category&amp;quot;. Look for commons sitelink there&lt;br /&gt;
	local fallback = _lookupFallback(qid,&amp;quot;P910&amp;quot;)&lt;br /&gt;
	if fallback then&lt;br /&gt;
		if categoryLink and categoryLink ~= fallback then&lt;br /&gt;
			consistent = false&lt;br /&gt;
			qid = nil&lt;br /&gt;
		else&lt;br /&gt;
			categoryLink = fallback&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- P1754 is the &amp;quot;list's main category&amp;quot;. Look for commons sitelink there&lt;br /&gt;
	fallback = _lookupFallback(qid,&amp;quot;P1754&amp;quot;)&lt;br /&gt;
	if fallback then&lt;br /&gt;
		if categoryLink and categoryLink ~= fallback then&lt;br /&gt;
			consistent = false&lt;br /&gt;
		else&lt;br /&gt;
			categoryLink = fallback&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return categoryLink, consistent, commonsSitelink&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Create Commons link corresponding to current article&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   namespace = namespace in Commons (&amp;quot;&amp;quot; for galleries)&lt;br /&gt;
--   default = use as Commons link, don't access wikidata&lt;br /&gt;
--   linktext = text to display in link&lt;br /&gt;
--   search = string to search for&lt;br /&gt;
--   qid = QID to lookup in wikidata (for testing only)&lt;br /&gt;
-- Returns:&lt;br /&gt;
--   formatted wikilink to Commons in specified namespace&lt;br /&gt;
function p._getCommons(namespace,default,linktext,search,qid)&lt;br /&gt;
	local nsColon&lt;br /&gt;
	if not namespace or namespace == &amp;quot;&amp;quot; then&lt;br /&gt;
		nsColon = &amp;quot;&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		nsColon = namespace..&amp;quot;:&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if default then&lt;br /&gt;
		return &amp;quot;[[Commons:&amp;quot;..nsColon..default..&amp;quot;|&amp;quot;..(linktext or default)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if search then&lt;br /&gt;
		return &amp;quot;[[Commons:Special:Search/&amp;quot;..nsColon..search..&amp;quot;|&amp;quot;..(linktext or search)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local wp_title, wp_ns&lt;br /&gt;
	wp_title, wp_ns, qid = _getTitleQID(qid)&lt;br /&gt;
	-- construct default result (which searches for title)&lt;br /&gt;
	local searchResult = &amp;quot;[[Commons:Special:Search/&amp;quot;..nsColon..wp_title..&amp;quot;|&amp;quot;..(linktext or wp_title)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	local commonsLink = nil&lt;br /&gt;
	local consistent = true&lt;br /&gt;
	if nsColon == &amp;quot;&amp;quot; then&lt;br /&gt;
		commonsLink, consistent = _lookupGallery(qid,true)&lt;br /&gt;
	elseif namespace:lower() == &amp;quot;category&amp;quot; then&lt;br /&gt;
		commonsLink, consistent = _lookupCategory(qid,true)&lt;br /&gt;
	end&lt;br /&gt;
	-- use wikidata if consistent&lt;br /&gt;
	if commonsLink and consistent then&lt;br /&gt;
		return &amp;quot;[[Commons:&amp;quot;..nsColon..commonsLink..&amp;quot;|&amp;quot;..(linktext or commonsLink)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	-- if not consistent, fall back to search and add to tracking cat&lt;br /&gt;
	if not consistent and wp_ns == 0 then&lt;br /&gt;
		local friendlyNS&lt;br /&gt;
		if nsColon == &amp;quot;&amp;quot; then&lt;br /&gt;
			friendlyNS = &amp;quot;gallery&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			friendlyNS = namespace:lower()&lt;br /&gt;
		end&lt;br /&gt;
		searchResult = searchResult..&amp;quot;[[Category:Inconsistent wikidata for Commons &amp;quot;..friendlyNS..&amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return searchResult&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns &amp;quot;best&amp;quot; Commons link: first look for gallery, then try category&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   default = use as Commons link, don't access wikidata&lt;br /&gt;
--   linktext = text to display in link&lt;br /&gt;
--   search = string to search for&lt;br /&gt;
--   qid = QID to lookup in wikidata (for testing only)&lt;br /&gt;
-- Returns:&lt;br /&gt;
--   formatted wikilink to Commons &amp;quot;best&amp;quot; landing page&lt;br /&gt;
function p._getGalleryOrCategory(default,linktext,search,qid)&lt;br /&gt;
	if default then&lt;br /&gt;
		return &amp;quot;[[Commons:&amp;quot;..default..&amp;quot;|&amp;quot;..(linktext or default)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if search then&lt;br /&gt;
		return &amp;quot;[[Commons:Special:Search/&amp;quot;..search..&amp;quot;|&amp;quot;..(linktext or search)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local wp_title, wp_ns&lt;br /&gt;
	wp_title, wp_ns, qid = _getTitleQID(qid)&lt;br /&gt;
	-- construct default result (which searches for title)&lt;br /&gt;
	local searchResult = &amp;quot;[[Commons:Special:Search/&amp;quot;..wp_title..&amp;quot;|&amp;quot;..(linktext or wp_title)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	local trackingCats = &amp;quot;&amp;quot;&lt;br /&gt;
	local galleryLink, consistent, commonsSitelink = _lookupGallery(qid,true)&lt;br /&gt;
	-- use wikidata if either sitelink or P935 exist, and they both agree&lt;br /&gt;
	if galleryLink and consistent then&lt;br /&gt;
		return &amp;quot;[[Commons:&amp;quot;..galleryLink..&amp;quot;|&amp;quot;..(linktext or galleryLink)..&amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if not consistent and wp_ns == 0 then&lt;br /&gt;
		trackingCats = &amp;quot;[[Category:Inconsistent wikidata for Commons gallery]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	-- if gallery is not good, fall back looking for category&lt;br /&gt;
	local categoryLink&lt;br /&gt;
	categoryLink, consistent = _lookupCategory(qid,false,commonsSitelink)&lt;br /&gt;
	if categoryLink and consistent then&lt;br /&gt;
		return &amp;quot;[[Commons:Category:&amp;quot;..categoryLink..&amp;quot;|&amp;quot;..(linktext or categoryLink)..&amp;quot;]]&amp;quot;..trackingCats&lt;br /&gt;
	end&lt;br /&gt;
	if not consistent and wp_ns == 0 then&lt;br /&gt;
		trackingCats = trackingCats..&amp;quot;[[Category:Inconsistent wikidata for Commons category]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return searchResult..trackingCats&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Does the article have a corresponding Commons gallery or category?&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   qid = QID to lookup in wikidata (for testing only)&lt;br /&gt;
-- Returns:&lt;br /&gt;
--   &amp;quot;yes&amp;quot; if so, blank if not&lt;br /&gt;
function p._hasGalleryOrCategory(qid)&lt;br /&gt;
	local wp_title, wp_ns&lt;br /&gt;
	wp_title, wp_ns, qid = _getTitleQID(qid)&lt;br /&gt;
	local galleryLink, consistent, commonsSitelink = _lookupGallery(qid,true)&lt;br /&gt;
	if galleryLink and consistent then&lt;br /&gt;
		return &amp;quot;yes&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local categoryLink&lt;br /&gt;
	categoryLink, consistent = _lookupCategory(qid,false,commonsSitelink)&lt;br /&gt;
	if categoryLink and consistent then&lt;br /&gt;
		return &amp;quot;yes&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Testing-only entry point for _getTitleQID&lt;br /&gt;
function p.getTitleQID(frame)&lt;br /&gt;
	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;br /&gt;
	local text, ns, qid = _getTitleQID(args[1])&lt;br /&gt;
	return text..&amp;quot;,&amp;quot;..ns..&amp;quot;,&amp;quot;..(qid or &amp;quot;nil&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Testing-only entry point for _lookupFallback&lt;br /&gt;
function p.lookupFallback(frame)&lt;br /&gt;
	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;br /&gt;
	local fallback = _lookupFallback(args[1],args[2])&lt;br /&gt;
	return fallback or &amp;quot;nil&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Find the Commons gallery page associated with article&lt;br /&gt;
function p.getGallery(frame)&lt;br /&gt;
	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;br /&gt;
	return p._getCommons(&amp;quot;&amp;quot;,args[1],args.linktext,args.search,args.qid)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Find the Commons category page associated with article&lt;br /&gt;
function p.getCategory(frame)&lt;br /&gt;
	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;br /&gt;
	return p._getCommons(&amp;quot;Category&amp;quot;,args[1],args.linktext,args.search,args.qid)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getGalleryOrCategory(frame)&lt;br /&gt;
	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;br /&gt;
	return p._getGalleryOrCategory(args[1],args.linktext,args.search,args.qid)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.hasGalleryOrCategory(frame)&lt;br /&gt;
	local args = getArgs(frame,{frameOnly=true,parentOnly=false,parentFirst=false})&lt;br /&gt;
	return p._hasGalleryOrCategory(args.qid)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Hike395</name></author>
		
	</entry>
</feed>