# HG changeset patch # User Nathan Phillip Brink # Date 2010-10-13 17:57:42 # Node ID 7ce16688498de34a077105477d10542a0fcc01a6 # Parent 936c42a99c1ef63fc361990b271d216e072ca727 Sort the college profiles listed on the ``School Selection'' page. diff --git a/admin/rehash.php b/admin/rehash.php --- a/admin/rehash.php +++ b/admin/rehash.php @@ -92,6 +92,17 @@ function school_list() /** * \brief + * Compare the two schools by their names. + * + * \see strcmp() + */ +function school_cmp($school_a, $school_b) +{ + return strcmp($school_a['name'], $school_b['name']); +} + +/** + * \brief * Write out the cache file which remembers the list of available * schools. * @@ -133,6 +144,7 @@ function school_cache($schools) $domain_cache_ptr[$domain_part] = $school['id']; } } + uasort($list_cache, 'school_cmp'); $cache = array('list' => $list_cache, 'domains' => $domain_cache);