Ticket #1252: mythweb.nodups.diff
File mythweb.nodups.diff, 2.6 KB (added by , 18 years ago) |
---|
-
mythweb/themes/default/header.php
132 132 <a onclick="get_element('search_hd').checked=get_element('search_hd').checked ? false : true;"><?php echo t('HD Only') ?></a> 133 133 </div> 134 134 <div> 135 <input type="checkbox" class="radio" id=" nodups" name="nodups" value="1"<?php echo $_SESSION['search']['nodups'] ? ' CHECKED' : '' ?>>136 <a onclick="get_element(' nodups').checked=get_element('nodups').checked ? false : true;"><?php echo t('Fold Showings') ?></a>135 <input type="checkbox" class="radio" id="fold_dups" name="fold_dups" value="1"<?php echo $_SESSION['search']['fold_dups'] ? ' CHECKED' : '' ?>> 136 <a onclick="get_element('fold_dups').checked=get_element('fold_dups').checked ? false : true;"><?php echo t('Fold Showings') ?></a> 137 137 </div> 138 138 </div> 139 139 -
mythweb/modules/tv/search.php
51 51 $_SESSION['search']['search_exact'] = _or($_GET['search_exact'], $_POST['search_exact']); 52 52 if ($_GET['search_hd'] || $_POST['search_hd']) 53 53 $_SESSION['search']['search_hd'] = _or($_GET['search_hd'], $_POST['search_hd']); 54 if ($_GET['fold_dups'] || $_POST['fold_dups']) 55 $_SESSION['search']['fold_dups'] = _or($_GET['fold_dups'], $_POST['fold_dups']); 54 56 55 // Flags that apply in all cases56 $nodups = _or($_GET['nodups'], $_POST['nodups']);57 58 57 // Start the query 59 58 $search_name = ''; 60 59 $query = array(); … … 76 75 // Find the query 77 76 if ($Canned_Searches[$search_name]) { 78 77 $query = array($Canned_Searches[$search_name]); 79 // default nodups on here, unless explicitly set80 if (!empty($nodups))81 $nodups = true;82 78 } 83 79 else 84 80 add_warning("Unknown canned query: $search_name"); … … 176 172 } 177 173 178 174 // Remove dups from the results if requested 179 if ($ nodups) {175 if ($_SESSION['search']['fold_dups']) { 180 176 $seen = array(); // program ids already seen 181 177 foreach( $Results as $dex => $row ) { 182 178 $uniquer = $row->programid . $row->channel->channum;