diff --git a/html/ops/error_summary.php b/html/ops/error_summary.php
index 5aee8d491a..fefe0ce3f8 100644
--- a/html/ops/error_summary.php
+++ b/html/ops/error_summary.php
@@ -22,6 +22,11 @@
require_once("../inc/util.inc");
require_once("../inc/result.inc");
+$ncodes = get_int('ncodes', true);
+if (!$ncodes) $ncodes = 10;
+$nresults_per_code = get_int('nresults_per_code', true);
+if (!$nresults_per_code) $nresults_per_code = 10;
+
function compare ($x, $y) {
return $x->count < $y->count;
}
@@ -38,7 +43,7 @@ foreach ($results as $r) {
$error_codes[$e] = $x;
} else {
$x = new StdClass;
- $x->count = 0;
+ $x->count = 1;
$x->results = array($r);
$error_codes[$e] = $x;
}
@@ -49,13 +54,13 @@ uasort($error_codes, 'compare');
page_head("Error summary");
$i = 0;
foreach ($error_codes as $code => $x) {
- if ($i++ > 10) break;
- echo "
Exit status".exit_status_string($code)." ($x->count results)\n";
+ if ($i++ >= $ncodes) break;
+ echo "