From: CMDR furrycat Date: Sun, 7 Feb 2016 08:30:25 +0000 (-0500) Subject: Show new entry. X-Git-Url: http://git.furryclan.net/?a=commitdiff_plain;h=6d788544d88debd9e17eabd7515db866a1750bf4;p=furrycat%2Frace-o-matic.git Show new entry. --- diff --git a/lib/entry.php b/lib/entry.php index 2ce0d41..b201155 100644 --- a/lib/entry.php +++ b/lib/entry.php @@ -81,9 +81,9 @@ $lap_number++; } - $dbh->commit(); + if ($dbh->commit()) return $entry; - return true; + return false; } function show_leg($station, $start_finish, $station_id, $system_id, $order, $n) { @@ -180,7 +180,11 @@ echo "

Entry $entry_id: CMDR $cmdr_name flying $ship_name in $race_name

\n"; echo "
\n"; } - else if (do_entry($race_id, $ship_id, $posted, $allotted_time)) return true; + else { + $entry = do_entry($race_id, $ship_id, $posted, $allotted_time); + if ($entry) return add_entry($race_id, $ship_id, $entry); + return true; + } } else echo "//-->\n"; if (! $entry) {