Order those who did not cut short ahead of those who did.
authorCMDR furrycat <elite@furrycat.net>
Fri, 29 Jan 2016 11:31:39 +0000 (06:31 -0500)
committerCMDR furrycat <elite@furrycat.net>
Fri, 29 Jan 2016 11:31:39 +0000 (06:31 -0500)
lib/race.php

index 2b4bf6e..b3d0266 100644 (file)
         affecting endurance races.
         Ordering by bonus time will allow a racer who didn't use the joker
         to win a tiebreak with one who did.
+        Ordering by cut short endorsement will penalise those who didn't
+        compete for the full race time but only when tied for penalty.
       */
-      $entries = $eq->orderByTotalDistance('desc')->orderByPenaltyTime()->orderByTotalTime()->orderByBonusTime()->find();
+      $eq->addAsColumn('CutShort', 'Endorsements & ' . Entry::EndorsementValue('c'));
+      $entries = $eq->orderByTotalDistance('desc')->orderByPenaltyTime()->orderBy('CutShort')->orderByTotalTime()->orderByBonusTime()->find();
       if (! $action) {
         echo "<p>" . $race->getLink() . "</p>\n";
         continue;