Ticket #1268: search_override.patch
File search_override.patch, 6.6 KB (added by , 18 years ago) |
---|
-
themes/default/tv/detail.php
300 300 else 301 301 echo t('Don\'t record this program.'); 302 302 ?></a></li> 303 303 <?php if(empty($schedule->search)) { ?> 304 304 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_once ?>" id="record_once"<?php 305 305 echo $schedule->type == rectype_once ? ' CHECKED' : '' ?> /> 306 306 <a onclick="get_element('record_once').checked=true;"><?php echo t('rectype-long: once') ?></a></li> 307 308 <?php if (empty($schedule->search)) { ?>309 307 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_daily ?>" id="record_daily"<?php 310 308 echo $schedule->type == rectype_daily ? ' CHECKED' : '' ?> /> 311 309 <a onclick="get_element('record_daily').checked=true;"><?php echo t('rectype-long: daily') ?></a></li> … … 313 311 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_weekly ?>" id="record_weekly"<?php 314 312 echo $schedule->type == rectype_weekly ? ' CHECKED' : '' ?> /> 315 313 <a onclick="get_element('record_weekly').checked=true;"><?php echo t('rectype-long: weekly') ?></a></li> 316 314 <?php } ?> 317 315 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_findone ?>" id="record_findone"<?php 318 316 echo $schedule->type == rectype_findone ? ' CHECKED' : '' ?> /> 319 317 <a onclick="get_element('record_findone').checked=true;"><?php echo t('rectype-long: findone') ?></a></li> … … 325 323 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_findweekly ?>" id="record_findweekly"<?php 326 324 echo $schedule->type == rectype_findweekly ? ' CHECKED' : '' ?> /> 327 325 <a onclick="get_element('record_findweekly').checked=true;"><?php echo t('rectype-long: findweekly') ?></a></li> 328 326 <?php if(empty($schedule->search)) { ?> 329 327 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_channel ?>" id="record_channel"<?php 330 328 echo $schedule->type == rectype_channel ? ' CHECKED' : '' ?> /> 331 329 <a onclick="get_element('record_channel').checked=true;"><?php echo t('rectype-long: channel', prefer_channum ? $channel->channum : $channel->callsign) ?></a></li> 332 330 <?php } ?> 333 331 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_always ?>" id="record_always"<?php 334 332 echo $schedule->type == rectype_always ? ' CHECKED' : '' ?> /> 335 333 <a onclick="get_element('record_always').checked=true;"><?php echo t('rectype-long: always') ?></a></li> 336 <?php } ?>337 334 </ul> 338 335 </div> 339 336 <?php -
includes/recording_schedules.php
138 138 var $findtime; 139 139 var $findid; 140 140 var $transcoder; 141 var $parentid; 141 142 142 143 var $texttype; 143 144 var $channel; … … 246 247 // Update the type, in case it changed 247 248 $this->type = $new_type; 248 249 // Update the record 249 $result = mysql_query('REPLACE INTO record (recordid,type,chanid,starttime,startdate,endtime,enddate,search,title,subtitle,description,profile,recpriority,category,maxnewest,inactive,maxepisodes,autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin,station,seriesid,programid,autocommflag,findday,findtime,findid,autotranscode,transcoder,tsdefault,autouserjob1,autouserjob2,autouserjob3,autouserjob4 ) values ('250 $result = mysql_query('REPLACE INTO record (recordid,type,chanid,starttime,startdate,endtime,enddate,search,title,subtitle,description,profile,recpriority,category,maxnewest,inactive,maxepisodes,autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin,station,seriesid,programid,autocommflag,findday,findtime,findid,autotranscode,transcoder,tsdefault,autouserjob1,autouserjob2,autouserjob3,autouserjob4,parentid) values (' 250 251 .escape($this->recordid, true) .',' 251 252 .escape($this->type) .',' 252 253 .escape($this->chanid) .',' … … 283 284 .escape($this->autouserjob1) .',' 284 285 .escape($this->autouserjob2) .',' 285 286 .escape($this->autouserjob3) .',' 286 .escape($this->autouserjob4) .')') 287 .escape($this->autouserjob4) .',' 288 .escape($this->parentid) .')') 287 289 or trigger_error('SQL Error: '.mysql_error(), FATAL); 288 290 // Get the id that was returned 289 291 $recordid = mysql_insert_id(); -
modules/tv/detail.php
40 40 $schedule = new Schedule(NULL); 41 41 42 42 // Handle custom search schedules 43 $schedule_note = ''; 44 if ($schedule->search && $schedule->search != searchtype_manual) { 45 $schedule_note = t('This program is already scheduled to be recorded via a $1custom search$2.', 46 '<a href='.root.'tv/schedules/custom/'.$schedule->recordid.'>', 47 '</a>'); 48 unset($schedule); 49 } 43 $schedule_note = ''; // Don't think it's needed; but leaving just in case 50 44 51 45 // Make sure this is a valid program. If not, forward the user back to the listings page 52 46 if (!strlen($program->starttime) && !$schedule->recordid) { … … 132 126 $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0; 133 127 $schedule->transcoder = $_POST['transcoder']; 134 128 $schedule->tsdefault = $_POST['timestretch']; 129 if($_POST['record'] == rectype_override) { 130 $schedule->parentid = $schedule->recid; 131 $schedule->search = 0; 132 } 133 135 134 // Back up the program type, and save the schedule 136 135 $schedule->save($type); 137 136 }