plugins.xeps: Fix previous commit (it was wrong side of the loopy loops)

Wed, 20 Jul 2011 01:16:34 +0200

author
Kim Alvefur <zash@zash.se>
date
Wed, 20 Jul 2011 01:16:34 +0200
changeset 85
7ec6df0e0ed0
parent 84
ce687757ce3d
child 86
2fa4d58349c8

plugins.xeps: Fix previous commit (it was wrong side of the loopy loops)

plugins/xeps.lua file | annotate | diff | comparison | revisions
--- a/plugins/xeps.lua	Wed Jul 20 01:11:11 2011 +0200
+++ b/plugins/xeps.lua	Wed Jul 20 01:16:34 2011 +0200
@@ -79,14 +79,14 @@
 		for k,v in string.gmatch(b,"<(%w+)>(.-)</%1>") do
 			currxep[k] = v;
 		end
+		if xeps_short[currxep.shortname] == nil then
+			xeps_short[currxep.shortname] = currxep.number;
+		elseif xeps_short[currxep.shortname] then
+			xeps_short[currxep.shortname] = false; -- kill dupes
+		end
 		xeps[currxep.number] = { };
 		for k, v in pairs(currxep) do
 			xeps[currxep.number][k] = v;
-			if xeps_short[currxep.shortname] == nil then
-				xeps_short[currxep.shortname] = currxep.number;
-			elseif xeps_short[currxep.shortname] then
-				xeps_short[currxep.shortname] = false; -- kill dupes
-			end
 		end
 	end
 	xeps["0028"] = { number = "0028", name = "XSF Plans for World Domination", type="Top Secret", status = "Hidden", updated = "Work ongoing" };

mercurial