[mythtv] [patch] mythweb commfree patch for "Channels" page

Dave Alden alden at math.ohio-state.edu
Sat Feb 14 10:00:18 EST 2004


Hi,
  Here is a patch for the configure channels webpage that allows you to set
the commfree flag.
...dave

ps  Chris, I didn't change the last edit field -- I wasn't sure if you were
    changing it for every single update, or just the larger ones.  :-)
-------------- next part --------------
Index: settings_channels.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/settings_channels.php,v
retrieving revision 1.2
diff -u -r1.2 settings_channels.php
--- settings_channels.php	22 Nov 2003 08:59:16 -0000	1.2
+++ settings_channels.php	14 Feb 2004 14:56:20 -0000
@@ -23,7 +23,8 @@
 									 .'contrast='.escape($_POST['contrast_'.$chanid])    .','
 									   .'colour='.escape($_POST['colour_'.$chanid])      .','
 										  .'hue='.escape($_POST['hue_'.$chanid])         .','
-								  .'recpriority='.escape($_POST['recpriority_'.$chanid]);
+								  .'recpriority='.escape($_POST['recpriority_'.$chanid]) .','
+								  .'commfree='.escape((isset($_POST['commfree_'.$chanid]) && $_POST['commfree_'.$chanid] == "on") ? 1 : 0);
 		// next, the fields that need to have a value, so we won't change them if they were emptied
 			if ($_POST['channum_'.$chanid])
 				$query .= ',channum='.escape($_POST['channum_'.$chanid]);
Index: themes/Default/settings_channels.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/themes/Default/settings_channels.php,v
retrieving revision 1.2
diff -u -r1.2 settings_channels.php
--- themes/Default/settings_channels.php	22 Nov 2003 08:59:16 -0000	1.2
+++ themes/Default/settings_channels.php	14 Feb 2004 14:56:22 -0000
@@ -32,6 +32,7 @@
 	<td width="8%">colour</td>
 	<td width="8%">hue</td>
 	<td width="5%">recpriority</td>
+	<td width="5%">commfree</td>
 </tr><?php
 		foreach ($Channels as $channel) {
 ?><tr class="settings" align="center">
@@ -47,6 +48,7 @@
 	<td><input type="text" size="6" name="colour_<?php echo $channel['chanid']?>" id="colour_<?php echo $channel['chanid']?>" value="<?php echo htmlentities($channel['colour'])?>"></td>
 	<td><input type="text" size="6" name="hue_<?php echo $channel['chanid']?>" id="hue_<?php echo $channel['chanid']?>" value="<?php echo htmlentities($channel['hue'])?>"></td>
 	<td><input type="text" size="2" name="recpriority_<?php echo $channel['chanid']?>" id="recpriority_<?php echo $channel['chanid']?>" value="<?php echo htmlentities($channel['recpriority'])?>"></td>
+	<td><input type="checkbox" name="commfree_<?php echo $channel['chanid']?>" <?php if (htmlentities($channel['commfree'])) echo "CHECKED" ?> ></td>
 </tr><?php
 		}
 ?>


More information about the mythtv-dev mailing list