Changeset - 3c5b498b2a1b
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2011-02-09 23:29:02
ohnobinki@ohnopublishing.net
Avoid using an anonymous function to support <php-5.3 (i.e., normaldotcom's old servers).
1 file changed with 10 insertions and 4 deletions:
0 comments (0 inline, 0 general)
inc/admin.inc
Show inline comments
 
@@ -141,10 +141,7 @@ function school_cache($schools)
 
	   * nearer to the end of the list. This way, the crawler
 
	   * doesn't have to decide how to sort the semesters itself:
 
	   */
 
	  usort($semesters, function ($sem_a, $sem_b)
 
		{
 
		  return $sem_a->time_start_get() - $sem_b->time_start_get();
 
		});
 
	  usort($semesters, 'school_cache_semesters_sort');
 

	
 
	  foreach ($school['crawled_semesters'] as $semester)
 
	    {
 
@@ -217,6 +214,15 @@ function school_cache($schools)
 

	
 
/**
 
 * \brief
 
 *   To support usort() call in school_cache() to sort semesters.
 
 */
 
function school_cache_semesters_sort (Semester $sem_a, Semester $sem_b)
 
{
 
  return $sem_a->time_start_get() - $sem_b->time_start_get();
 
}
 

	
 
/**
 
 * \brief
 
 *   Invoke a school's registration data crawler.
 
 *
 
 * Each school may export registration data on publically accessible
0 comments (0 inline, 0 general)