Ticket #4558: mythweb-recgroupsort.patch
File mythweb-recgroupsort.patch, 1.5 KB (added by , 16 years ago) |
---|
-
modules/tv/includes/recording_schedules.php
561 561 // Default 562 562 $groups['Default'] = t('Default'); 563 563 // Current recgroups 564 $result = mysql_query('SELECT DISTINCT recgroup FROM record'); 564 $result = mysql_query('SELECT DISTINCT recgroup FROM recorded '. 565 'WHERE recgroup != "LiveTV" AND recgroup != "Deleted" UNION '. 566 'SELECT DISTINCT recgroup FROM record '. 567 'WHERE recgroup != "LiveTV" AND recgroup != "Deleted" '. 568 'ORDER BY recgroup;'); 569 565 570 while (list($group) = mysql_fetch_row($result)) { 566 571 $group or $group = t('Default'); 567 572 $groups[$group] = $group; 568 573 } 569 574 mysql_free_result($result); 570 // recgroups from current recordings571 $result = mysql_query('SELECT DISTINCT recgroup FROM recorded');572 while (list($group) = mysql_fetch_row($result)) {573 $group or $group = t('Default');574 $groups[$group] = $group;575 }576 mysql_free_result($result);577 // Ignore LiveTV and Deleted578 unset($groups['LiveTV']);579 unset($groups['Deleted']);580 575 } 581 576 // Print the <select> 582 577 echo "<select name=\"$name\">";