Ticket #11970: mythweb-schedule-channel.patch

File mythweb-schedule-channel.patch, 3.1 KB (added by Karl Newman <SiliconFiend@…>, 7 years ago)

Fix mythweb's schedule editor for This Channel filter

  • tv/classes/Schedule.php

    diff -Naur modules.orig/tv/classes/Schedule.php modules/tv/classes/Schedule.php
    old new  
    205205            }
    206206        // Data is a recordid -- load its contents
    207207            if (!is_array($data) && $data > 0) {
    208                 $data = $db->query_assoc('SELECT *, IF(type='.rectype_always.',-1,chanid)         AS chanid,
     208                $data = $db->query_assoc('SELECT *,
    209209                                                 UNIX_TIMESTAMP(startdate)+TIME_TO_SEC(starttime) AS starttime,
    210210                                                 UNIX_TIMESTAMP(enddate)+TIME_TO_SEC(endtime)     AS endtime
    211211                                            FROM record
  • tv/tmpl/default/schedules.php

    diff -Naur modules.orig/tv/tmpl/default/schedules.php modules/tv/tmpl/default/schedules.php
    old new  
    9595            $urlstr = 'recordid='.$schedule->recordid;
    9696
    9797            $css_class = ($schedule->type == rectype_dontrec ? 'deactivated' : 'scheduled');
    98         // If this is an 'always on any channel' or 'find one' recording w/o a channel, set the channel name to 'Any'
    99             if ($schedule->type == rectype_always || ($schedule->type == rectype_findone && !preg_match('/\\S/', $schedule->channel->channum)))
     98        // If this is an 'always on any channel' or 'find one' recording without the 'This Channel' filter, set the channel name to 'Any'
     99            if (($schedule->type == rectype_always || $schedule->type == rectype_findone) && !($schedule->filter & (1 << 10))) {
    100100                $schedule->channel->name = '[ '.t('Any').' ]';
     101                $schedule->channel->channum = 0;
     102            }
    101103        // A program id counter for popup info
    102104            if ($_SESSION["show_popup_info"]) {
    103105                static $program_id_counter = 0;
  • tv/tmpl/lite/schedules.php

    diff -Naur modules.orig/tv/tmpl/lite/schedules.php modules/tv/tmpl/lite/schedules.php
    old new  
    5353            $urlstr = 'recordid='.$schedule->recordid;
    5454
    5555            $css_class = ($schedule->type == rectype_dontrec ? 'deactivated' : 'scheduled');
    56         // If this is an 'always on any channel' or 'find one' recording w/o a channel, set the channel name to 'Any'
    57             if ($schedule->type == rectype_always || ($schedule->type == rectype_findone && !preg_match('/\\S/', $schedule->channel->channum)))
     56        // If this is an 'always on any channel' or 'find one' recording without the 'This Channel' filter, set the channel name to 'Any'
     57            if (($schedule->type == rectype_always || $schedule->type == rectype_findone) && !($schedule->filter & (1 << 10))) {
    5858                $schedule->channel->name = '[ '.t('Any').' ]';
     59                $schedule->channel->channum = 0;
     60            }
    5961
    6062        // Print a dividing row if grouping changes
    6163            if ($group_field == 'type')