Skip to content

Commit

Permalink
Don't pull back the sanity test failure message when it is not used.
Browse files Browse the repository at this point in the history
The STF value is not used by sanity_test_failures.php but a non-empty
value is required to make port-display supply a link to the STF message.
  • Loading branch information
dlangille committed Dec 3, 2017
1 parent 5aa8ef5 commit 19a6466
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/sanity_test_failures.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ function CreateHTML() {
if (IsSet($this->Filter)) {
$sql = "select * from SanityTestFailures($this->UserID, '" . pg_escape_string($this->Filter) . "')";
} else {
# we don't need/use the value for stf_message here but a non-empty value is required
# to get port-display to provide a link to the sanity test failure message.
# to reduce the data set set, let's just pull back 1.
$sql = "set client_encoding = 'ISO-8859-15';
SELECT S.*, STF.message as stf_message
SELECT S.*, 1 as stf_message
FROM SanityTestFailures(" . pg_escape_string($this->UserID) . ") S LEFT OUTER JOIN sanity_test_failures STF
ON S.commit_log_id = STF.commit_log_id";
}
Expand Down

0 comments on commit 19a6466

Please sign in to comment.