Ticket #1374: 1374.patch
File 1374.patch, 1.3 KB (added by , 20 years ago) |
---|
-
includes/sorting.php
126 126 } 127 127 128 128 function by_title(&$a, &$b) { 129 return s trcasecmp($a->title, $b->title);129 return sort_prog_titles($a->title, $b->title); 130 130 } 131 131 132 132 function by_type(&$a, &$b) { … … 198 198 return ($a->transcoder > $b->transcoder) ? 1 : -1; 199 199 } 200 200 201 function strip_articles($str) 202 { 203 if(preg_match('/^A /', $str)) 204 return substr($str, 2); 205 if(preg_match('/^An /', $str)) 206 return substr($str, 3); 207 if(preg_match('/^The /', $str)) 208 return substr($str, 4); 209 return $str; 210 } 211 212 function sort_prog_titles($a, $b) // Arguments are strings 213 { 214 return strcasecmp(strip_articles($a), strip_articles($b)); 215 } -
modules/tv/recorded.php
203 203 } 204 204 205 205 // Sort the program titles 206 ksort($Program_Titles);206 uksort($Program_Titles, 'sort_prog_titles'); 207 207 ksort($Groups); 208 208 209 209 // Keep track of the program/title the user wants to view