Station order when adding a new race.
authorCMDR furrycat <elite@furrycat.net>
Mon, 18 Jan 2016 11:29:13 +0000 (06:29 -0500)
committerCMDR furrycat <elite@furrycat.net>
Mon, 18 Jan 2016 11:29:13 +0000 (06:29 -0500)
Order stations by most recently-added system, as usually systems will be added in preparation for a new race.

lib/race.php

index 4509942..cd629f3 100644 (file)
   function add_race($name, $allotted_time) {
     $sq = new StationQuery;
     $sq->joinWith('Station.System');
-    $stations = $sq->orderBy('System.Name')->orderByName()->find();
+    $stations = $sq->orderBySystemId('desc')->orderByName()->find();
 
     $posted = array();
     foreach ($_POST as $k => $v) {