Ticket #5021: mythweb-info.patch
File mythweb-info.patch, 3.3 KB (added by , 16 years ago) |
---|
-
mythweb/modules/tv/includes/objects/Program.php
117 117 var $jobs = array(); // recent/pending jobqueue entries 118 118 var $jobs_possible = array(); // Jobs this program can be assigned to 119 119 120 // Extra info from record table, if available 121 var $rec_search; 122 var $rec_title; 123 var $rec_desc; 124 var $findtime; 125 var $findday; 126 120 127 function Program($data) { 121 128 global $db; 122 129 // This is a mythbackend-formatted program - info about this data structure is stored in libs/libmythtv/programinfo.cpp … … 313 320 $this->css_class = category_class($this); 314 321 // Create the fancy description 315 322 $this->update_fancy_desc(); 323 324 // If there is a recordid, grab some extra info from the record table 325 if( $this->recordid ) { 326 $sh = $db->prepare( 'SELECT title, description, search, findday, findtime from record where recordid = ?'); 327 $sh->execute($this->recordid); 328 if( $data = $sh->fetch_assoc() ) { 329 $this->rec_search = $data['search']; 330 $this->rec_title = $data['title']; 331 $this->rec_desc = $data['description']; 332 $this->findtime = $data['findtime']; 333 switch( $data['findday'] ) { 334 case 0: $this->findday = t('Saturday'); break; 335 case 1: $this->findday = t('Sunday'); break; 336 case 2: $this->findday = t('Monday'); break; 337 case 3: $this->findday = t('Tuesday'); break; 338 case 4: $this->findday = t('Wednesday'); break; 339 case 5: $this->findday = t('Thursday'); break; 340 case 6: $this->findday = t('Friday'); break; 341 } 342 } 343 $sh->finish(); 344 } 316 345 } 317 346 318 347 function merge($prog) { … … 690 719 case rectype_findone: $str .= t('rectype-long: findone'); break; 691 720 case rectype_override: $str .= t('rectype-long: override'); break; 692 721 case rectype_dontrec: $str .= t('rectype-long: dontrec'); break; 693 case rectype_finddaily: $str .= t('rectype-long: finddaily'); break; 694 case rectype_findweekly: $str .= t('rectype-long: findweekly'); break; 722 case rectype_finddaily: $str .= t('rectype-long: finddaily'); 723 $str .= "\t<dt>".t('Find Time').":</dt>\n" 724 ."\t<dd>"; 725 $str .= $this->findtime; break; 726 case rectype_findweekly: $str .= t('rectype-long: findweekly'); 727 $str .= "\t<dt>".t('Find Day').":</dt>\n" 728 ."\t<dd>"; 729 $str .= t($this->findday)." ".$this->findtime; break; 695 730 default: $str .= t('Unknown'); 696 731 } 732 // Print a bit more info for custom shedules 733 if ( $this->rec_search != 0 ) { 734 $str .= "<br>".html_entities($this->rec_title); 735 switch( $this->rec_search ) { 736 case '1': 737 case '2': 738 case '3': 739 $str .= "<br>".html_entities($this->rec_desc); 740 break; 741 } 742 } 697 743 $str .= "</dd>\n"; 698 744 } 699 745 // Recording Priority 700 746 $str .= "\t<dt>".t('Recording Priority')."</dt><dd>".$this->recpriority."</dd>\n"; 747 // Program ID 748 $str .= "\t<dt>".t('Program ID')."</dt><dd>".$this->programid."</dd>\n"; 701 749 // Recording status 702 750 if (!empty($this->recstatus)) { 703 751 $str .= "\t<dt>".t('Notes').":</dt>\n"