Ticket #3929: mythweb-channel_detail_selected_channel.patch

File mythweb-channel_detail_selected_channel.patch, 1.9 KB (added by sphery <mtdean@…>, 13 years ago)
  • mythweb/modules/tv/channel.php

     
    5858/**
    5959 * Prints a <select> of the available channels
    6060/**/
    61     function channel_select($params = '') {
     61    function channel_select($params = '', $selected='') {
    6262        global $Channels;
    6363        echo "<select name=\"chanid\" $params>";
    6464        foreach ($Channels as $channel) {
     
    6969            echo '<option value="', $channel->chanid, '"',
    7070                 ' title="', html_entities($channel->name), '"';
    7171        // Selected?
    72             if ($channel->chanid == $_GET['chanid'])
     72            if (($channel->chanid == $selected) ||
     73                ($channel->chanid == $_GET['chanid']))
    7374                echo ' SELECTED';
    7475        // Print ther est of the content
    7576            echo '>';
  • mythweb/modules/tv/tmpl/default/channel.php

     
    3636    <table id="-jumpto" class="commandbox commands" border="0" cellspacing="0" cellpadding="0">
    3737    <tr>
    3838        <td class="-jumpto"><?php echo t('Jump To') ?>:</td>
    39         <td class="-hour"><?php channel_select('onchange="$(\'program_listing\').submit()"') ?></td>
     39        <td class="-hour"><?php channel_select('onchange="$(\'program_listing\').submit()"', $this_channel->chanid) ?></td>
    4040        <td class="-day"><a href="<?php echo root ?>tv/channel/<?php echo $this_channel->chanid, '/', $_SESSION['list_time'] - (24 * 60 * 60) ?>"
    4141                ><img src="<?php echo skin_url ?>img/left.gif" border="0"></a>
    4242            <?php date_select('onchange="$(\'program_listing\').submit()"') ?>