Ticket #5195: mythweb-5195-commfree_channels.patch

File mythweb-5195-commfree_channels.patch, 3.1 KB (added by sphery <mtdean@…>, 13 years ago)
  • mythweb/modules/tv/set_channels.php

     
    3636                                             colour        = ?,
    3737                                             hue           = ?,
    3838                                             recpriority   = ?,
    39                                              commfree      = ?,
     39                                             commmethod    = ?,
    4040                                             useonairguide = ?,
    4141                                             visible       = ?';
    4242                $query_params[] = $_POST['xmltvid_'.$chanid];
     
    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
  • mythweb/modules/tv/tmpl/default/set_channels.php

     
    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