<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://staging.twogpedia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3APageTabs_team</id>
	<title>Module:PageTabs team - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://staging.twogpedia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3APageTabs_team"/>
	<link rel="alternate" type="text/html" href="https://staging.twogpedia.com/index.php?title=Module:PageTabs_team&amp;action=history"/>
	<updated>2026-05-12T20:36:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://staging.twogpedia.com/index.php?title=Module:PageTabs_team&amp;diff=8080&amp;oldid=prev</id>
		<title>Couchor: Created page with &quot;local cargo = mw.ext.cargo  local p = {}  function p.main(frame) 	local currentTitle = mw.title.getCurrentTitle().text 	local split = mw.text.split(currentTitle, &#039;/&#039;) 	local parent = split[1] .. &#039;/&#039; .. split[2] 	local subPage = split[3] 	 	local str = &#039;{{Tabs|name1=Overview|link1=&#039; .. parent 	local order = 1  	if subPage == &#039;Results&#039; then 		order = order + 1 		str = str .. &#039;|name&#039; .. order .. &#039;=Results&#039; .. &#039;|link&#039; .. order .. &#039;=&#039; .. currentTitle 	else 		-- Check if has r...&quot;</title>
		<link rel="alternate" type="text/html" href="https://staging.twogpedia.com/index.php?title=Module:PageTabs_team&amp;diff=8080&amp;oldid=prev"/>
		<updated>2023-11-12T20:09:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local cargo = mw.ext.cargo  local p = {}  function p.main(frame) 	local currentTitle = mw.title.getCurrentTitle().text 	local split = mw.text.split(currentTitle, &amp;#039;/&amp;#039;) 	local parent = split[1] .. &amp;#039;/&amp;#039; .. split[2] 	local subPage = split[3] 	 	local str = &amp;#039;{{Tabs|name1=Overview|link1=&amp;#039; .. parent 	local order = 1  	if subPage == &amp;#039;Results&amp;#039; then 		order = order + 1 		str = str .. &amp;#039;|name&amp;#039; .. order .. &amp;#039;=Results&amp;#039; .. &amp;#039;|link&amp;#039; .. order .. &amp;#039;=&amp;#039; .. currentTitle 	else 		-- Check if has r...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local cargo = mw.ext.cargo&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local currentTitle = mw.title.getCurrentTitle().text&lt;br /&gt;
	local split = mw.text.split(currentTitle, &amp;#039;/&amp;#039;)&lt;br /&gt;
	local parent = split[1] .. &amp;#039;/&amp;#039; .. split[2]&lt;br /&gt;
	local subPage = split[3]&lt;br /&gt;
	&lt;br /&gt;
	local str = &amp;#039;{{Tabs|name1=Overview|link1=&amp;#039; .. parent&lt;br /&gt;
	local order = 1&lt;br /&gt;
&lt;br /&gt;
	if subPage == &amp;#039;Results&amp;#039; then&lt;br /&gt;
		order = order + 1&lt;br /&gt;
		str = str .. &amp;#039;|name&amp;#039; .. order .. &amp;#039;=Results&amp;#039; .. &amp;#039;|link&amp;#039; .. order .. &amp;#039;=&amp;#039; .. currentTitle&lt;br /&gt;
	else&lt;br /&gt;
		-- Check if has results&lt;br /&gt;
		local tables = &amp;quot;AllMatches&amp;quot;&lt;br /&gt;
	    local fields = &amp;#039;_pageName&amp;#039;&lt;br /&gt;
		local cargoArgs = {&lt;br /&gt;
			where = &amp;#039;(p1 = &amp;quot;&amp;#039; .. parent .. &amp;#039;&amp;quot; OR p2=&amp;quot;&amp;#039; .. parent .. &amp;#039;&amp;quot;) AND winner IS NOT NULL AND winner != &amp;quot;0&amp;quot;&amp;#039;,&lt;br /&gt;
			limit =  1,&lt;br /&gt;
		}&lt;br /&gt;
		local soloMatches = cargo.query(tables, fields, cargoArgs)&lt;br /&gt;
		&lt;br /&gt;
		local hadResults = false&lt;br /&gt;
		&lt;br /&gt;
		if #soloMatches &amp;gt; 0 then&lt;br /&gt;
			hadResults = true&lt;br /&gt;
		else&lt;br /&gt;
			-- Check if part of tournament prizes&lt;br /&gt;
			tables = &amp;#039;Participants, Prizes&amp;#039;&lt;br /&gt;
			fields = &amp;#039;Participants._pageName=_pageName&amp;#039;&lt;br /&gt;
			cargoArgs = {&lt;br /&gt;
				join = &amp;#039;Participants._pageName=Prizes._pageName&amp;#039;,&lt;br /&gt;
				where = &amp;#039;Participants.team = &amp;quot;&amp;#039; .. parent .. &amp;#039;&amp;quot;&amp;#039;,&lt;br /&gt;
				limit = 1&lt;br /&gt;
			}&lt;br /&gt;
			local placementResults = cargo.query(tables, fields, cargoArgs)&lt;br /&gt;
			&lt;br /&gt;
			if #placementResults &amp;gt; 0 then &lt;br /&gt;
				hadResults = true	&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if hadResults then&lt;br /&gt;
			order = order + 1&lt;br /&gt;
			str = str .. &amp;#039;|name&amp;#039; .. order .. &amp;#039;=Results&amp;#039; .. &amp;#039;|link&amp;#039; .. order .. &amp;#039;=&amp;#039; .. parent .. &amp;#039;/Results&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	str = str .. &amp;#039;}}&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	if order &amp;gt; 1 then return frame:preprocess(str) end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Couchor</name></author>
	</entry>
</feed>