Ticket #8661: duplicate-missing.patch

File duplicate-missing.patch, 13.3 KB (added by Bill Meek <keemllib@…>, 14 years ago)

Lightly tested with lite template, works for me with default.

  • mythplugins/mythweb/modules/tv/tmpl/default/schedules.php

     
    9292<?php
    9393        $prev_group = '';
    9494        $cur_group  = '';
    95         foreach ($the_schedules as $schedule) {
     95        foreach ($the_schedules as $sched_elmt) {
    9696        // Reset the command variable to a default URL
    97             $urlstr = 'recordid='.$schedule->recordid;
     97            $urlstr = 'recordid='.$sched_elmt->recordid;
    9898
    99             $css_class = ($schedule->type == rectype_dontrec ? 'deactivated' : 'scheduled');
     99            $css_class = ($sched_elmt->type == rectype_dontrec ? 'deactivated' : 'scheduled');
    100100        // If this is an 'always on any channel' or 'find one' recording w/o a channel, set the channel name to 'Any'
    101             if ($schedule->type == rectype_always || ($schedule->type == rectype_findone && !preg_match('/\\S/', $schedule->channel->channum)))
    102                 $schedule->channel->name = '[ '.t('Any').' ]';
     101            if ($sched_elmt->type == rectype_always || ($sched_elmt->type == rectype_findone && !preg_match('/\\S/', $sched_elmt->channel->channum)))
     102                $sched_elmt->channel->name = '[ '.t('Any').' ]';
    103103        // A program id counter for popup info
    104104            if ($_SESSION["show_popup_info"]) {
    105105                static $program_id_counter = 0;
     
    108108
    109109        // Print a dividing row if grouping changes
    110110            if ($group_field == 'type')
    111                 $cur_group = $schedule->texttype;
     111                $cur_group = $sched_elmt->texttype;
    112112            elseif ($group_field == 'channum')
    113                 $cur_group = ($schedule->channel->channum ? $schedule->channel->channum.' - ' : '').$schedule->channel->name;
     113                $cur_group = ($sched_elmt->channel->channum ? $sched_elmt->channel->channum.' - ' : '').$sched_elmt->channel->name;
    114114            elseif ($group_field == 'profile')
    115                 $cur_group = $schedule->profile;
     115                $cur_group = $sched_elmt->profile;
    116116            elseif ($group_field == 'recgroup')
    117                 $cur_group = $schedule->recgroup;
     117                $cur_group = $sched_elmt->recgroup;
    118118            elseif ($group_field == 'storagegroup')
    119                 $cur_group = $schedule->storagegroup;
     119                $cur_group = $sched_elmt->storagegroup;
    120120        // "none"?
    121121            $cur_group or $cur_group = t('None');
    122122
    123             $style_class = $schedule->css_class;
    124             if ($schedule->type == rectype_override)
     123            $style_class = $sched_elmt->css_class;
     124            if ($sched_elmt->type == rectype_override)
    125125                $style_class .= ' record_override_record';
    126             elseif ($schedule->type == rectype_dontrec)
     126            elseif ($sched_elmt->type == rectype_dontrec)
    127127                $style_class .= ' record_override_suppress';
    128128
    129129            if ( $cur_group != $prev_group && $group_field != '' ) {
     
    136136        <?php if ($group_field != '') echo "<td class=\"list\">&nbsp;</td>\n" ?>
    137137    <td class="x-title <?php echo $style_class ?>"><?php
    138138        // Window status text, for the mouseover
    139             $wstatus = "Details for $schedule->title";
     139            $wstatus = "Details for $sched_elmt->title";
    140140        // Print a link to the program detail for this schedule
    141             echo '<a id="schedule-'.$schedule->recordid.'"';
     141            echo '<a id="schedule-'.$sched_elmt->recordid.'"';
    142142            if ($_SESSION["show_popup_info"]) {
    143                 echo ' onmouseover = "currently_hovered_id = this.id; details_delay_timer_id = setTimeout(function () {load_tool_tip(\'schedule-'.$schedule->recordid.'\',\''.$schedule->recordid.'\');}, 250);"';
     143                echo ' onmouseover = "currently_hovered_id = this.id; details_delay_timer_id = setTimeout(function () {load_tool_tip(\'schedule-'.$sched_elmt->recordid.'\',\''.$sched_elmt->recordid.'\');}, 250);"';
    144144                echo ' onmouseout  = "currently_hovered_id = null; clearTimeout( details_delay_timer_id ); details_delay_timer_id = null;"';
    145145            }
    146146            echo ' href="'.root_url.'tv/';
    147147        // Link to different places for different kinds of schedules
    148             if ($schedule->search) {
     148            if ($sched_elmt->search) {
    149149                echo 'schedules/',
    150                      ($schedule->search == searchtype_manual) ? 'manual'
     150                     ($sched_elmt->search == searchtype_manual) ? 'manual'
    151151                                                              : 'custom',
    152                      '/', $schedule->recordid;
     152                     '/', $sched_elmt->recordid;
    153153            }
    154154            else
    155                 echo 'detail?recordid='.$schedule->recordid;
     155                echo 'detail?recordid='.$sched_elmt->recordid;
    156156        // Finish off the link
    157             echo '">'.$schedule->title;
    158             if (in_array($schedule->type, array(rectype_once, rectype_override, rectype_dontrec)) && preg_match('/\\w/', $schedule->subtitle))
    159                 echo ":  $schedule->subtitle";
     157            echo '">'.$sched_elmt->title;
     158            if (in_array($sched_elmt->type, array(rectype_once, rectype_override, rectype_dontrec)) && preg_match('/\\w/', $sched_elmt->subtitle))
     159                echo ":  $sched_elmt->subtitle";
    160160            echo '</a>';
    161161        ?></td>
    162162    <td class="x-priority"><?php
    163             echo $schedule->recpriority
     163            echo $sched_elmt->recpriority
    164164        ?></td>
    165165    <td class="x-channel"><?php
    166166            if ($_SESSION["prefer_channum"]) {
    167                 if ($schedule->channel->channum)
    168                     echo $schedule->channel->channum.' - ';
     167                if ($sched_elmt->channel->channum)
     168                    echo $sched_elmt->channel->channum.' - ';
    169169            }
    170170            else {
    171                 if ($schedule->channel->callsign)
    172                     echo $schedule->channel->callsign.' - ';
     171                if ($sched_elmt->channel->callsign)
     172                    echo $sched_elmt->channel->callsign.' - ';
    173173            }
    174             echo $schedule->channel->name;
     174            echo $sched_elmt->channel->name;
    175175        ?></td>
    176     <td class="x-profile"><?php echo _or($schedule->profile,  '&nbsp;') ?></td>
     176    <td class="x-profile"><?php echo _or($sched_elmt->profile,  '&nbsp;') ?></td>
    177177    <td class="x-transcoder"><?php
    178178        global $Transcoders;
    179         echo _or($Transcoders[$schedule->transcoder],  '&nbsp;')
     179        echo _or($Transcoders[$sched_elmt->transcoder],  '&nbsp;')
    180180        ?></td>
    181     <td class="x-group"><?php echo _or($schedule->recgroup, '&nbsp;') ?></td>
    182     <td class="x-type"><?php  echo $schedule->texttype ?></td>
    183     <td class="x-sgroup"><?php echo _or($schedule->storagegroup, '&nbsp;') ?></td>
    184     <td class="x-startoffset"><?php echo _or($schedule->startoffset, '&nbsp;') ?></td>
    185     <td class="x-endoffset"><?php echo _or($schedule->endoffset, '&nbsp;') ?></td>
    186     <td class="x-lastrec"><?php echo _or($schedule->last_record, '&nbsp;') ?></td>
     181    <td class="x-group"><?php echo _or($sched_elmt->recgroup, '&nbsp;') ?></td>
     182    <td class="x-type"><?php  echo $sched_elmt->texttype ?></td>
     183    <td class="x-sgroup"><?php echo _or($sched_elmt->storagegroup, '&nbsp;') ?></td>
     184    <td class="x-startoffset"><?php echo _or($sched_elmt->startoffset, '&nbsp;') ?></td>
     185    <td class="x-endoffset"><?php echo _or($sched_elmt->endoffset, '&nbsp;') ?></td>
     186    <td class="x-lastrec"><?php echo _or($sched_elmt->last_record, '&nbsp;') ?></td>
    187187</tr><?php
    188188            $prev_group = $cur_group;
    189189        }
  • mythplugins/mythweb/modules/tv/tmpl/lite/schedules.php

     
    5252</tr><?php
    5353        $prev_group = '';
    5454        $cur_group  = '';
    55         foreach ($the_schedules as $schedule) {
     55        foreach ($the_schedules as $sched_elmt) {
    5656        // Reset the command variable to a default URL
    57             $urlstr = 'recordid='.$schedule->recordid;
     57            $urlstr = 'recordid='.$sched_elmt->recordid;
    5858
    59             $css_class = ($schedule->type == rectype_dontrec ? 'deactivated' : 'scheduled');
     59            $css_class = ($sched_elmt->type == rectype_dontrec ? 'deactivated' : 'scheduled');
    6060        // If this is an 'always on any channel' or 'find one' recording w/o a channel, set the channel name to 'Any'
    61             if ($schedule->type == rectype_always || ($schedule->type == rectype_findone && !preg_match('/\\S/', $schedule->channel->channum)))
    62                 $schedule->channel->name = '[ '.t('Any').' ]';
     61            if ($sched_elmt->type == rectype_always || ($sched_elmt->type == rectype_findone && !preg_match('/\\S/', $sched_elmt->channel->channum)))
     62                $sched_elmt->channel->name = '[ '.t('Any').' ]';
    6363
    6464        // Print a dividing row if grouping changes
    6565            if ($group_field == 'type')
    66                 $cur_group = $schedule->texttype;
     66                $cur_group = $sched_elmt->texttype;
    6767            elseif ($group_field == 'channum')
    68                 $cur_group = ($schedule->channel->channum ? $schedule->channel->channum.' - ' : '').$schedule->channel->name;
     68                $cur_group = ($sched_elmt->channel->channum ? $sched_elmt->channel->channum.' - ' : '').$sched_elmt->channel->name;
    6969            elseif ($group_field == 'profile')
    70                 $cur_group = $schedule->profile;
     70                $cur_group = $sched_elmt->profile;
    7171            elseif ($group_field == 'recgroup')
    72                 $cur_group = $schedule->recgroup;
     72                $cur_group = $sched_elmt->recgroup;
    7373        // "none"?
    7474            $cur_group or $cur_group = t('None');
    7575
    76             $style_class = $schedule->css_class;
    77             if ($schedule->type == rectype_override)
     76            $style_class = $sched_elmt->css_class;
     77            if ($sched_elmt->type == rectype_override)
    7878                $style_class .= ' record_override_record';
    79             elseif ($schedule->type == rectype_dontrec)
     79            elseif ($sched_elmt->type == rectype_dontrec)
    8080                $style_class .= ' record_override_suppress';
    8181
    8282            if ( $cur_group != $prev_group && $group_field != '' ) {
     
    8989        <?php if ($group_field != '') echo "<td class=\"list\">&nbsp;</td>\n" ?>
    9090    <td class="<?php echo $style_class ?>"><?php
    9191        // Window status text, for the mouseover
    92             $wstatus = "Details for $schedule->title";
     92            $wstatus = "Details for $sched_elmt->title";
    9393        // Print a link to the program detail for this schedule
    9494            echo '<a href="'.root_url.'tv/';
    9595        // Link to different places for different kinds of schedules
    96             if ($schedule->search) {
     96            if ($sched_elmt->search) {
    9797                echo 'schedules/',
    98                      ($schedule->search == searchtype_manual) ? 'manual'
     98                     ($sched_elmt->search == searchtype_manual) ? 'manual'
    9999                                                              : 'custom',
    100                      '/', $schedule->recordid;
     100                     '/', $sched_elmt->recordid;
    101101            }
    102102            else
    103                 echo 'detail?recordid='.$schedule->recordid;
     103                echo 'detail?recordid='.$sched_elmt->recordid;
    104104        // Finish off the link
    105             echo '">'.$schedule->title;
    106             if (in_array($schedule->type, array(rectype_once, rectype_override, rectype_dontrec)) && preg_match('/\\w/', $schedule->subtitle))
    107                 echo ":  $schedule->subtitle";
     105            echo '">'.$sched_elmt->title;
     106            if (in_array($sched_elmt->type, array(rectype_once, rectype_override, rectype_dontrec)) && preg_match('/\\w/', $sched_elmt->subtitle))
     107                echo ":  $sched_elmt->subtitle";
    108108            echo '</a>';
    109109        ?></td>
    110110    <td><?php
    111             echo $schedule->recpriority
     111            echo $sched_elmt->recpriority
    112112        ?></td>
    113113    <td><?php
    114114            if ($_SESSION["prefer_channum"]) {
    115                 if ($schedule->channel->channum)
    116                     echo $schedule->channel->channum.' - ';
     115                if ($sched_elmt->channel->channum)
     116                    echo $sched_elmt->channel->channum.' - ';
    117117            }
    118118            else {
    119                 if ($schedule->channel->callsign)
    120                     echo $schedule->channel->callsign.' - ';
     119                if ($sched_elmt->channel->callsign)
     120                    echo $sched_elmt->channel->callsign.' - ';
    121121            }
    122             echo $schedule->channel->name;
     122            echo $sched_elmt->channel->name;
    123123        ?></td>
    124     <td nowrap><?php echo _or($schedule->profile,  '&nbsp;') ?></td>
     124    <td nowrap><?php echo _or($sched_elmt->profile,  '&nbsp;') ?></td>
    125125    <td nowrap>
    126126        <?php
    127127        global $Transcoders;
    128         echo _or($Transcoders[$schedule->transcoder],  '&nbsp;')
     128        echo _or($Transcoders[$sched_elmt->transcoder],  '&nbsp;')
    129129        ?>
    130130    </td>
    131     <td nowrap><?php echo _or($schedule->recgroup, '&nbsp;') ?></td>
    132     <td nowrap><?php echo $schedule->texttype ?></td>
     131    <td nowrap><?php echo _or($sched_elmt->recgroup, '&nbsp;') ?></td>
     132    <td nowrap><?php echo $sched_elmt->texttype ?></td>
    133133</tr><?php
    134134            $prev_group = $cur_group;
    135135        }