Ticket #5712: mythweb-olddate.patch

File mythweb-olddate.patch, 748 bytes (added by bucky@…, 12 years ago)

Allow startdates in the past for searches

  • modules/tv/search.php

    diff -bBrU 5 mythweb-orig/modules/tv/search.php mythweb/modules/tv/search.php
    old new  
    311311            $query .= '('.implode(' AND ', $extra_query).')';
    312312        }
    313313
    314314    // Search!
    315315        if (!empty($query))
     316            $tmpdate = strtotime($_SESSION['search']['starttime']);
     317            if ($tmpdate == false) {
    316318            $Results =& load_all_program_data(time(), strtotime('+1 month'), NULL, false, $query);
     319            } else {
     320              $Results =& load_all_program_data($tmpdate, strtotime('+1 month'), NULL, false, $query);
     321            }
    317322
    318323    }
    319324
    320325// Query cleanup
    321326    if (empty($Results))