? test.patch
? archive/Thumbs.db
? archive/scripts/1193091785.mp3
? catalog/The Database.mdb
? catalog/fixit.php
? catalog/import.php
? schedule/station_schedule.install_
? schedule/station_schedule.module_
? schedule/views.inc_
? schedule/images/Thumbs.db
Index: dayhour.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/dayhour.inc,v
retrieving revision 1.16
diff -u -p -u -p -r1.16 dayhour.inc
--- dayhour.inc	9 Nov 2007 07:40:48 -0000	1.16
+++ dayhour.inc	24 Nov 2007 03:03:08 -0000
@@ -4,6 +4,7 @@
 
 // there are 1440 minutes in a day (60minute * 24hours = 1day)
 define('MINUTES_IN_DAY', 1440);
+define('MINUTES_IN_WEEK', 7 * MINUTES_IN_DAY);
 
 /**
  * Turn a string into a valid hour.
Index: schedule/station_schedule.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/schedule/station_schedule.module,v
retrieving revision 1.66
diff -u -p -u -p -r1.66 station_schedule.module
--- schedule/station_schedule.module	22 Nov 2007 06:23:21 -0000	1.66
+++ schedule/station_schedule.module	24 Nov 2007 03:08:18 -0000
@@ -616,7 +616,9 @@ function station_schedule_nodeapi(&$node
         $node->djs = _station_schedule_program_load_djs($node->nid);
 
         $node->times = array();
-        $result = db_query('SELECT * FROM {station_schedule_item} s WHERE s.program_nid = %d ORDER BY s.schedule_nid, s.start', $node->nid);
+        // Load the schedule items in order of start time while taking into
+        // account Drupal's first day of the week setting.
+        $result = db_query('SELECT * FROM {station_schedule_item} s WHERE s.program_nid = %d ORDER BY s.schedule_nid, ((s.start + %d) %% %d)', $node->nid, MINUTES_IN_DAY * (7 - variable_get('date_first_day', 0)), MINUTES_IN_WEEK);
         while ($item = db_fetch_array($result)) {
           $node->times[$item['schedule_nid']][] = $item;
         }
