From 8a8f5e6dfc56831caef1dbf79251f1df4c71544f Mon Sep 17 00:00:00 2001
From: Magnus Hagander <magnus@hagander.net>
Date: Tue, 16 Jun 2009 20:24:11 +0200
Subject: [PATCH] Eh, actually sort the top posters. That was rather
 embarassing...

---
 generator.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/generator.py b/generator.py
index 2a82fa2..4e9db08 100755
--- a/generator.py
+++ b/generator.py
@@ -77,12 +77,12 @@ class Generator:
 				description=desc))
 			self.items.append(PlanetPost(post[0], post[1], post[2], post[3], post[5], post[6], desc, post[8], post[9]))
 
-		c.execute("SELECT name,blogurl,feedurl,count(*) FROM planet.feeds INNER JOIN planet.posts ON planet.feeds.id=planet.posts.feed WHERE age(dat) < '1 month' AND team IS NULL GROUP BY name,blogurl,feedurl")
+		c.execute("SELECT name,blogurl,feedurl,count(*) FROM planet.feeds INNER JOIN planet.posts ON planet.feeds.id=planet.posts.feed WHERE age(dat) < '1 month' AND team IS NULL GROUP BY name,blogurl,feedurl ORDER BY 4,1")
 		for feed in c.fetchall():
 			self.topposters.append(PlanetFeed(feed))
 		if len(self.topposters) < 2: self.topposters = []
 
-		c.execute("SELECT teams.name,teams.teamurl,NULL,count(*) FROM planet.teams INNER JOIN planet.feeds ON planet.feeds.team=planet.teams.id INNER JOIN planet.posts ON planet.feeds.id=planet.posts.feed WHERE age(dat) < '1 month' GROUP BY teams.name,teams.teamurl")
+		c.execute("SELECT teams.name,teams.teamurl,NULL,count(*) FROM planet.teams INNER JOIN planet.feeds ON planet.feeds.team=planet.teams.id INNER JOIN planet.posts ON planet.feeds.id=planet.posts.feed WHERE age(dat) < '1 month' GROUP BY teams.name,teams.teamurl ORDER BY 4,1")
 		for feed in c.fetchall():
 			self.topteams.append(PlanetFeed(feed))
 		if len(self.topteams) < 2: self.topteams = []
-- 
2.39.5

