Index: modules/tv/includes/programs.php
===================================================================
--- modules/tv/includes/programs.php	(revision 22349)
+++ modules/tv/includes/programs.php	(working copy)
@@ -135,11 +136,9 @@
                          channel.callsign,
                          channel.channum
                   FROM program
-                       LEFT JOIN programrating USING (chanid, starttime)
-                       LEFT JOIN channel ON program.chanid = channel.chanid
-                       LEFT JOIN credits ON (program.chanid = credits.chanid AND program.starttime = credits.starttime)
-                       LEFT JOIN people ON (credits.person = people.person)
-                 WHERE';
+                       INNER JOIN channel ON program.chanid = channel.chanid
+                       LEFT JOIN programrating on programrating.chanid = channel.chanid AND programrating.starttime = program.starttime
+                 WHERE channel.visible=1 AND ';
     // Only loading a single channel worth of information
         if ($chanid > 0)
             $query .= ' program.chanid='.$db->escape($chanid);
