Index: schedule/station_schedule.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/schedule/station_schedule.module,v
retrieving revision 1.94
diff -u -p -r1.94 station_schedule.module
--- schedule/station_schedule.module	28 Nov 2009 23:26:57 -0000	1.94
+++ schedule/station_schedule.module	10 Jan 2010 22:20:40 -0000
@@ -614,7 +614,7 @@ function station_schedule_nodeapi(&$node
         $node->times = array();
         // 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);
+        $result = db_query('SELECT * FROM {station_schedule_item} s INNER JOIN {node} n on n.nid=s.schedule_nid WHERE s.program_nid = %d AND n.status = 1 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;
         }
