Ticket #11903: mythweb_customschedfix.patch

File mythweb_customschedfix.patch, 3.7 KB (added by Karl Newman <SiliconFiend@…>, 7 years ago)

Patch to save filter options, inetref, season and episode for custom and manual schedules

  • tv/recommended.php

    diff -Naur modules.orig/tv/recommended.php modules/tv/recommended.php
    old new  
    3535               
    3636        }
    3737       
    38         $shows =& load_all_program_data(time(), strtotime('+1 month'), NULL, false, "({$query})", true);
     38        $shows =& load_all_program_data(time(), strtotime('+1 month'), NULL, false, strlen($query) ? "({$query})" : 'FALSE', true);
    3939
    4040// Load the class for this page
    4141    require_once tmpl_dir.'recommended.php';
  • tv/schedules_custom.php

    diff -Naur modules.orig/tv/schedules_custom.php modules/tv/schedules_custom.php
    old new  
    2525    else
    2626        $schedule = new Schedule(NULL);
    2727
     28// Load the utility/display functions for scheduling
     29    require_once 'includes/schedule_utils.php';
     30
    2831// The user tried to update the recording settings - update the database and the variable in memory
    2932    if (isset($_POST['save'])) {
    3033    // Which type of recording is this?  Make sure an illegal one isn't specified
     
    8790            $schedule->startoffset   = intval($_POST['startoffset']);
    8891            $schedule->endoffset     = intval($_POST['endoffset']);
    8992            $schedule->prefinput     = $_POST['prefinput'];
     93            $schedule->inetref       = $_POST['inetref'];
     94            $schedule->season        = intval($_POST['season']);
     95            $schedule->episode       = intval($_POST['episode']);
     96            $schedule->filter        = generateFilter();
    9097        // Some settings specific to manual recordings (since we have no program to match against)
    9198            $schedule->chanid        = $_POST['channel'];
    9299            $schedule->station       = Channel::find($schedule->chanid)->callsign;
     
    172179    if ($schedule->length < 1)
    173180        $schedule->length = 120;
    174181
    175 // Load the utility/display functions for scheduling
    176     require_once 'includes/schedule_utils.php';
    177 
    178182// Load the class for this page
    179183    require_once tmpl_dir.'schedules_custom.php';
    180184
  • tv/schedules_manual.php

    diff -Naur modules.orig/tv/schedules_manual.php modules/tv/schedules_manual.php
    old new  
    2323    else
    2424        $schedule = new Schedule(NULL);
    2525
     26// Load the utility/display functions for scheduling
     27    require_once 'includes/schedule_utils.php';
     28
    2629// The user tried to update the recording settings - update the database and the variable in memory
    2730    if (isset($_POST['save'])) {
    2831    // Which type of recording is this?  Make sure an illegal one isn't specified
     
    7275            $schedule->startoffset   = intval($_POST['startoffset']);
    7376            $schedule->endoffset     = intval($_POST['endoffset']);
    7477            $schedule->prefinput     = $_POST['prefinput'];
     78            $schedule->inetref       = $_POST['inetref'];
     79            $schedule->season        = intval($_POST['season']);
     80            $schedule->episode       = intval($_POST['season']);
     81            $schedule->filter        = generateFilter();
    7582        // Some settings specific to manual recordings (since we have no program to match against)
    7683            $schedule->chanid        = $_POST['channel'];
    7784            $schedule->station       = Channel::find($schedule->chanid)->callsign;
     
    129136    if ($schedule->length < 1)
    130137        $schedule->length = 120;
    131138
    132 // Load the utility/display functions for scheduling
    133     require_once 'includes/schedule_utils.php';
    134 
    135139// Load the class for this page
    136140    require_once tmpl_dir.'schedules_manual.php';
    137141