Accéder au contenu.
Menu Sympa

devel - [Devel] Patch to sort RSS feed by ascending occurrence order

Objet : devel-adl

Archives de la liste

[Devel] Patch to sort RSS feed by ascending occurrence order


Chronologique Discussions 
  • From: David MENTRE <dmentre AT linux-france.org>
  • To: devel AT agendadulibre.org
  • Subject: [Devel] Patch to sort RSS feed by ascending occurrence order
  • Date: Sat, 24 Dec 2005 20:29:21 +0100
  • List-archive: <http://lolut.utbm.info/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>
  • Organization: none

Hi Thomas,

Here is a patch so that RSS feeds are sorted by ascending occurrence
order of events:

Index: rss.php
===================================================================
--- rss.php (revision 119)
+++ rss.php (working copy)
@@ -51,14 +51,16 @@
{
$sql = "select * from events where " .
"(start_time <= '" . date_timestamp2mysql($end) . "') AND " .
- "(end_time >= '" . date_timestamp2mysql($start) . "') AND
(moderated=1)";
+ "(end_time >= '" . date_timestamp2mysql($start) . "') AND
(moderated=1)" .
+ "ORDER BY start_time ASC";
}
else
{
$sql = "select * from events where " .
"(start_time <= '" . date_timestamp2mysql($end) . "') AND " .
"(end_time >= '" . date_timestamp2mysql($start) . "') AND " .
- "((region=" . $region . ") OR (locality=1)) AND (moderated=1)";
+ "((region=" . $region . ") OR (locality=1)) AND (moderated=1)" .
+ "ORDER BY start_time ASC";
}

return $db->query ($sql);


I think it would be a useful addition, so that RSS feeds are correctly
ordered in Firefox.

Yours,
d.
--
pub 1024D/A3AD7A2A 2004-10-03 David MENTRE <dmentre AT linux-france.org>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A






Archives gérées par MHonArc 2.6.16.

Haut de le page