Skip to content

Commit f47fb5c

Browse files
committed
Fixes #5195, this removes all uses of channel.commfree and replaces them with channel.commmethod, including searches.
git-svn-id: http://svn.mythtv.org/svn/trunk@17424 7dbf422c-18fa-0310-86e9-fd20926502f2
1 parent e395b99 commit f47fb5c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/tv/search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
$extra_query[] = 'program.hdtv & 1';
208208
// Commercial-free channels only?
209209
if ($_SESSION['search']['commfree'])
210-
$extra_query[] = 'channel.commfree=1';
210+
$extra_query[] = 'channel.commmethod=-2';
211211
// Build the actual search query
212212
$query = '';
213213
foreach ($_SESSION['search']['as'] as $i => $string) {

modules/tv/set_channels.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
colour = ?,
3737
hue = ?,
3838
recpriority = ?,
39-
commfree = ?,
39+
commmethod = ?,
4040
useonairguide = ?,
4141
visible = ?';
4242
$query_params[] = $_POST['xmltvid_'.$chanid];
@@ -48,7 +48,7 @@
4848
$query_params[] = $_POST['colour_'.$chanid];
4949
$query_params[] = $_POST['hue_'.$chanid];
5050
$query_params[] = $_POST['recpriority_'.$chanid];
51-
$query_params[] = empty($_POST['commfree_'.$chanid]) ? 0 : 1;
51+
$query_params[] = empty($_POST['commfree_'.$chanid]) ? -1 : -2;
5252
$query_params[] = empty($_POST['useonairguide_'.$chanid]) ? 0 : 1;
5353
$query_params[] = empty($_POST['visible_'.$chanid]) ? 0 : 1;
5454
// next, the fields that need to have a value, so we won't change them if they were emptied

modules/tv/tmpl/default/set_channels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<td><input type="text" size="5" name="colour_<?php echo $channel['chanid'] ?>" id="colour_<?php echo $channel['chanid'] ?>" value="<?php echo html_entities($channel['colour']) ?>" style="text-align: center" /></td>
5252
<td><input type="text" size="5" name="hue_<?php echo $channel['chanid'] ?>" id="hue_<?php echo $channel['chanid'] ?>" value="<?php echo html_entities($channel['hue']) ?>" style="text-align: center" /></td>
5353
<td><input type="text" size="2" name="recpriority_<?php echo $channel['chanid'] ?>" id="recpriority_<?php echo $channel['chanid'] ?>" value="<?php echo html_entities($channel['recpriority']) ?>" style="text-align: center" /></td>
54-
<td><input type="checkbox" name="commfree_<?php echo $channel['chanid'] ?>" value="1"<?php if (!empty($channel['commfree'])) echo ' CHECKED' ?> /></td>
54+
<td><input type="checkbox" name="commfree_<?php echo $channel['chanid'] ?>" value="1"<?php if (!empty($channel['commmethod']) && $channel['commmethod'] == -2) echo ' CHECKED' ?> /></td>
5555
<td><input type="checkbox" name="visible_<?php echo $channel['chanid'] ?>" value="1"<?php if (!empty($channel['visible'])) echo ' CHECKED' ?> /></td>
5656
<td><input type="checkbox" name="useonairguide_<?php echo $channel['chanid'] ?>" value="1"<?php if (!empty($channel['useonairguide'])) echo ' CHECKED' ?> /></td>
5757
</tr><?php

0 commit comments

Comments
 (0)