Ticket #1874: mythweb-never_record_on_detail_page.patch
File mythweb-never_record_on_detail_page.patch, 3.1 KB (added by , 18 years ago) |
---|
-
mythweb/modules/tv/detail.php
146 146 $schedule->save($type); 147 147 } 148 148 } 149 elseif (isset($_GET['forget_old']) || isset($_POST['forget_old'])) { 150 $program->rec_forget_old(); 151 // Wait for a second so the backend can catch up 152 sleep(1); 153 154 // Redirect back to the page again, but without the query string, so reloads are cleaner 155 header('Location: '.root.'tv/detail/'.$program->chanid.'/'.$program->starttime); 156 exit; 157 } 158 elseif (isset($_GET['never_record']) || isset($_POST['never_record'])) { 159 $program->rec_never_record(); 160 // Wait for a second so the backend can catch up 161 sleep(1); 162 163 // Redirect back to the page again, but without the query string, so reloads are cleaner 164 header('Location: '.root.'tv/detail/'.$program->chanid.'/'.$program->starttime); 165 exit; 166 } 149 167 // Load default settings for recpriority, autoexpire etc 150 168 else { 151 169 // auto-commercial-flag -
mythweb/modules/tv/tmpl/default/detail.php
101 101 <dt><?php echo t('MythTV Status') ?>: </dt> 102 102 <dd><?php 103 103 echo $GLOBALS['RecStatus_Reasons'][$program->recstatus]; 104 ?></dd> 104 if (($program->recstatus == 'Recorded') || 105 ($program->recstatus == 'NeverRecord')) { 106 if (preg_match('/\\S/', $program->title) 107 && (preg_match('/\\S/', $program->programid.$program->subtitle.$program->description))) { 108 echo " (<a href=\"".root."tv/detail/" 109 .$program->chanid."/".$program->starttime 110 ."?forget_old=yes\">".t('Forget Old')."</a>)"; 111 } 112 } ?></dd> 105 113 <?php } ?> 106 114 </dl> 107 115 </div> … … 263 271 else 264 272 echo t('Find other showings of this program'); 265 273 ?></a> 274 <?php 275 if (($program->recstatus != 'Recorded') && 276 ($program->recstatus != 'NeverRecord') && 277 ($program->recstatus != 'Recording')) { 278 if (preg_match('/\\S/', $program->title) 279 && (preg_match('/\\S/', $program->programid.$program->subtitle.$program->description))) { 280 echo "<a href=\"".root."tv/detail/".$program->chanid 281 .'/'.$program->starttime."?never_record=yes\">" 282 .t('Never Record')."</a>"; 283 } 284 } ?> 285 266 286 <a href="<?php echo root ?>tv/list?time=<?php echo $_SESSION['list_time'] ?>"><?php 267 287 echo t('Back to the program listing') 268 288 ?></a>