die('could not determine the number of commit elements'); } $NumFilesTouched = $myrow['count']; } $sql = "\nSELECT FPC.*, STF.message as stf_message\n FROM freshports_commit('" . pg_escape_string($message_id) . "', {$PageSize}, ({$PageNo} - 1 ) * {$PageSize}, {$User->id}) FPC\n LEFT OUTER JOIN sanity_test_failures STF\n ON FPC.commit_log_id = STF.commit_log_id\nORDER BY port, element_pathname"; if ($Debug) { echo "\n<pre>sql={$sql}</pre>\n"; } $result = pg_exec($database, $sql); if ($result) { $numrows = pg_numrows($result); if ($numrows) { require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/display_commit.php'; $DisplayCommit = new DisplayCommit($database, $result); $DisplayCommit->Debug = $Debug; $DisplayCommit->SetShowAllPorts(true); $DisplayCommit->SetShowEntireCommit(true); $DisplayCommit->SanityTestFailure = true; $RetVal = $DisplayCommit->CreateHTML(); echo $DisplayCommit->HTML; echo '<tr><TD VALIGN="top"><p>Number of ports [& non-ports] in this commit: ' . $NumFilesTouched . '</p></td></tr>'; } else { echo '<tr><TD VALIGN="top"><P>Sorry, nothing found in the database....</P>' . "\n"; echo "</TD></tr>"; } } else { syslog(LOG_NOTICE, __FILE__ . '::' . __LINE__ . ': ' . pg_last_error()); exit; } } } else {