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	6 Mar 2010 18:57:25 -0000
@@ -605,6 +605,10 @@ function station_schedule_nodeapi(&$node
 //        }
 //        break;
 
+      case 'update':
+        if ($node->status!=0)
+          break;
+
       case 'delete':
         // Remove the schedule item.
         db_query('DELETE FROM {station_schedule_item} WHERE program_nid = %d', $node->nid);
@@ -614,7 +618,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;
         }
