[pgstatus] [PATCH 2/3] Add the raw parameter to all the build log links
Makes it more explicit that this parameter is available.
---
library.php | 11 ++++++-----
logs.php | 2 +-
recent.php | 2 +-
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/library.php b/library.php
index 1695b06..fe6269f 100644
--- a/library.php
+++ b/library.php
@@ -639,18 +639,19 @@ function loglink($package, $version, $arch, $timestamp, $count, $failed) {
$log = "no log";
else if ($failed) {
$text = "<span class=\"red\">last log</span>";
- $log = build_log_link($package, $arch, $version, $timestamp, $text);
+ $log = build_log_link($package, $arch, $version, $timestamp, 0, $text);
$log = " | " . $log;
}
return sprintf("%s | %s%s", $old, $all, $log);
}
-function build_log_link($package, $arch, $version, $timestamp, $text) {
- return sprintf("<a href=\"fetch.php?pkg=%s&arch=%s&ver=%s&stamp=%s\">%s</a>",
+function build_log_link($package, $arch, $version, $timestamp, $raw, $text) {
+ return sprintf("<a href=\"fetch.php?pkg=%s&arch=%s&ver=%s&stamp=%s&raw=%s\">%s</a>",
urlencode($package),
urlencode($arch),
urlencode($version),
urlencode($timestamp),
+ urlencode($raw),
$text);
}
@@ -745,7 +746,7 @@ function pkg_status($status, $info=array()) {
$text = $compactstate[preg_replace("/ .*$/", "", $text)];
if (have_a_log($info)) {
$version = pkg_version($info["version"], $info["binary_nmu_version"]);
- $text = build_log_link($info["package"], $info["architecture"], $version, $info["real_timestamp"], $text);
+ $text = build_log_link($info["package"], $info["architecture"], $version, $info["real_timestamp"], 0, $text);
}
if (!$compact
&& in_array($status, array("Needs-Build", "BD-Uninstallable"))
@@ -1210,7 +1211,7 @@ function buildd_failures($problems, $pas, $suite) {
if (empty($version) || empty($timestamp) || $reason == "failing reason") {
array_push($archs_data, $arch);
} else {
- array_push($archs_data, build_log_link($package, $arch, $version, $timestamp, $arch));
+ array_push($archs_data, build_log_link($package, $arch, $version, $timestamp, 0, $arch));
}
}
$extra = "";
diff --git a/logs.php b/logs.php
index 7e8304f..99f1039 100644
--- a/logs.php
+++ b/logs.php
@@ -109,7 +109,7 @@ if (empty($pkg)) {
$result = color_text("Maybe-".ucwords($r["result"]), $r["result"] == "failed");
$link = build_log_link($pkg, $r["arch"], $r["version"], strtotime($r["timestamp"]),
- $result);
+ 0, $result);
$duration = date_diff_details(0, $r["build_time"]);
$disk_space = logsize($r["disk_space"]);
$builder = $r["builder"];
diff --git a/recent.php b/recent.php
index 55aa353..1fd0263 100644
--- a/recent.php
+++ b/recent.php
@@ -72,7 +72,7 @@ while($r = pg_fetch_assoc($query_result)) {
$ver = logs_link($r["package"], "", $r["version"], $r["distribution"], $r["version"]);
$arch = logs_link($r["package"], $r["arch"], "", $r["distribution"], $r["arch"]);
$result = color_text("Maybe-".ucwords($r["result"]), $r["result"] == "failed");
- $link = build_log_link($r["package"], $r["arch"], $r["version"], strtotime($r["timestamp"]), $result);
+ $link = build_log_link($r["package"], $r["arch"], $r["version"], strtotime($r["timestamp"]), 0, $result);
if (empty($r["builder"])) {
$builder = no_empty_text("");
--
2.11.0
Reply to: