? archive/_________station_archive.install
? archive/____station_archive.module
? catalog/The Database.mdb
? catalog/fixit.php
? catalog/import.php
Index: dayhour.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/dayhour.inc,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 dayhour.inc
--- dayhour.inc	10 Aug 2007 17:13:15 -0000	1.14
+++ dayhour.inc	22 Oct 2007 00:38:47 -0000
@@ -77,13 +77,15 @@ function station_valid_day($day) {
  * @param $day
  *   An optional integer for the day of the week, zero being Sunday.
  * @return
- *   If $day is specified a string, othereise an array of the names of all the
- *   days in the week.
+ *   If $day is specified a string, othereise an array of the names of all
+ *   the days in the week. When an array is returned it will be ordered
+ *   honoring the site's first day of the week setting.
  */
 function station_day_name($day = NULL) {
   static $days;
+
   if (!isset($days)) {
-    $days = array(
+    $names = array(
       0 => t('Sunday'),
       t('Monday'),
       t('Tuesday'),
@@ -92,6 +94,11 @@ function station_day_name($day = NULL) {
       t('Friday'),
       t('Saturday')
     );
+    $day_offset = variable_get('date_first_day', 0);
+    $days = array();
+    for ($i = $day_offset; $i < (7 + $day_offset); $i++) {
+      $days[$i % 7] = $names[$i % 7];
+    }
   }
 
   if ($day === NULL) {
Index: schedule/station_schedule.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/schedule/station_schedule.module,v
retrieving revision 1.52
diff -u -p -u -p -r1.52 station_schedule.module
--- schedule/station_schedule.module	22 Oct 2007 00:03:20 -0000	1.52
+++ schedule/station_schedule.module	22 Oct 2007 00:32:48 -0000
@@ -73,6 +73,9 @@ function station_schedule_menu($may_cach
           'type' => MENU_DEFAULT_LOCAL_TASK,
           'weight' => -10,
         );
+        // Use a separate variable to set the weights since station_day_name()
+        // may return index values that are not sorted.
+        $weight = 0;
         foreach (station_day_name() as $day => $dayname) {
           $items[] = array(
             'path' => "node/$nid/view/". strtolower($dayname),
@@ -80,7 +83,7 @@ function station_schedule_menu($may_cach
             'callback' => 'station_schedule_day_page',
             'callback arguments' => array($node, $day),
             'type' => MENU_LOCAL_TASK,
-            'weight' => $day,
+            'weight' => $weight++,
           );
         }
 
@@ -214,7 +217,9 @@ function station_schedule_form($node) {
  */
 function station_schedule_load($node) {
   $schedule = array();
-  for ($day = 0; $day < 7; $day++) {
+  // Use station_day_name() for the day ordering in case Sunday isn't the
+  // first day of the week.
+  foreach (station_day_name() as $day => $name) {
     $schedule[$day] = array();
 
     $start = $day * MINUTES_IN_DAY;
