diff options
-rw-r--r-- | lib.php | 4 | ||||
-rw-r--r-- | test_index.php | 6 |
2 files changed, 6 insertions, 4 deletions
@@ -140,11 +140,13 @@ function timesort($a, $b) * Publish BS stats as HTTP headers for remote services to adapt. * * @param array $stats + * @param integer $buildtime_total + * @param integer $build_count * @param array $last_package * * @return void */ -function publish_stats_headers($stats, $last_package = null) +function publish_stats_headers($stats, $buildtime_total, $build_count, $last_package = null) { foreach ($stats as $k => $v) { header("X-BS-Queue-$k: $v"); diff --git a/test_index.php b/test_index.php index 6754702..f9121c8 100644 --- a/test_index.php +++ b/test_index.php @@ -33,7 +33,7 @@ require __DIR__ . '/lib.php'; if (!is_dir($upload_dir)) { $msg = "$upload_dir does not exist on this system. Please check your config."; error_log($msg); - die($msg); + //die($msg); } $g_user = isset($_GET['user']) ? htmlentities(strip_tags($_GET['user'])) : null; @@ -146,8 +146,8 @@ list($stats, $users, $total, $pkgs) = build_stats($pkgs); $upload_time = get_upload_time(); -$last_pkg = ($_GET['last'] && $total > 0) ? reset($pkgs) : null; -publish_stats_headers($stats, $last_pkg); +$last_pkg = (isset($_GET['last']) && $total > 0) ? reset($pkgs) : null; +publish_stats_headers($stats, $buildtime_total, $build_count, $last_pkg); ?> <!DOCTYPE html> |