Ticket #6510: search-options.patch

File search-options.patch, 1.5 KB (added by iskimj@…, 16 years ago)

patch: modules/tv/search.php

  • mythplugins/mythweb/modules/tv/search.php

     
    205205                                    .'program.originalairdate<='.$db->escape(date('Y-m-d', $tmpdate)).')';
    206206                }
    207207            }
    208         // HDTV only?
    209             if ($_SESSION['search']['hd'])
    210                 $extra_query[] = 'program.hdtv & 1';
    211             if ($_SESSION['search']['generic'])
    212                 $extra_query[] = 'program.generic = 0';
    213         // Commercial-free channels only?
    214             if ($_SESSION['search']['commfree'])
    215                 $extra_query[] = 'channel.commmethod=-2';
    216208        // Build the actual search query
    217209            $query = '';
    218210            foreach ($_SESSION['search']['as'] as $i => $string) {
     
    307299            $query   = implode(' OR ', $query);
    308300        }
    309301
     302    // HDTV only?
     303        if ($_SESSION['search']['hd'])
     304            $extra_query[] = 'program.hdtv & 1';
     305    // Ignore generic program listings?
     306        if ($_SESSION['search']['generic'])
     307            $extra_query[] = 'program.generic = 0';
     308    // Commercial-free channels only?
     309        if ($_SESSION['search']['commfree'])
     310            $extra_query[] = 'channel.commmethod=-2';
     311
    310312    // Finish the query and add any extra parameters
    311313        if ($query)
    312314            $query = "($query)";