Ticket #2572: sanity_patch.diff

File sanity_patch.diff, 732 bytes (added by anonymous, 13 years ago)
  • mythweb/modules/tv/list.php

     
    5959    // Get the available date range
    6060        $min_days = $db->query_col('SELECT TO_DAYS(min(starttime)) - TO_DAYS(NOW()) FROM program');
    6161        $max_days = $db->query_col('SELECT TO_DAYS(max(starttime)) - TO_DAYS(NOW()) FROM program');
     62        if($min_days<-7)
     63            $min_days=-7;
     64        if($max_days>30)
     65            $max_days=30;
    6266    // Print out the list
    6367        echo '<select name="date" onchange="get_element(\'program_listing\').submit()">';
    6468        for ($i=$min_days; $i<=$max_days; $i++) {