From 328338c9f1e2be3160e58223bef3e0121719d75b Mon Sep 17 00:00:00 2001 From: randomdan Date: Tue, 6 Jul 2010 18:26:08 +0000 Subject: Group by sync times instead of guessing at days --- gentoobrowse/home.xslt | 28 ++++++++++------------------ gentoobrowse/views/newebuilds.xml | 10 +++++++--- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/gentoobrowse/home.xslt b/gentoobrowse/home.xslt index 368d481..35fd4ef 100644 --- a/gentoobrowse/home.xslt +++ b/gentoobrowse/home.xslt @@ -11,26 +11,18 @@

Newest ebuilds

- - - + + + - - - + + +
TodayYesterdayThe day before
-
    - -
-
-
    - -
-
-
    - -
-
+
    + +
+
diff --git a/gentoobrowse/views/newebuilds.xml b/gentoobrowse/views/newebuilds.xml index 93d7286..1476533 100644 --- a/gentoobrowse/views/newebuilds.xml +++ b/gentoobrowse/views/newebuilds.xml @@ -3,14 +3,18 @@ - SELECT filename, description, moddate, p.name AS pkgname, c.name AS catname, - EXTRACT('day' FROM ((SELECT MAX(fm.firstseen) FROM files fm) - (f.firstseen - interval '1hour'))) AS age + SELECT filename, description, moddate, p.name AS pkgname, c.name AS catname, f.firstseen sync FROM ebuilds e, files f, packages p, categories c WHERE e.ebuildid = f.fileid AND e.packageid = p.packageid AND p.categoryid = c.categoryid - AND f.firstseen > (SELECT MAX(fm.firstseen) - INTERVAL '2.1 days' FROM files fm) + AND f.firstseen > (SELECT DISTINCT f.firstseen FROM files f ORDER BY f.firstseen DESC LIMIT 1 OFFSET 3) ORDER BY c.name, p.name, e.versioninst + + + SELECT DISTINCT f.firstseen AS synctime FROM files f ORDER BY f.firstseen DESC LIMIT 3 + + -- cgit v1.2.3