summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl46
1 files changed, 46 insertions, 0 deletions
diff --git a/CGI.pl b/CGI.pl
index 68bb7edca..1b122aa73 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -509,6 +509,52 @@ sub PutHeader {
}
+sub DumpBugActivity {
+ my ($id, $starttime) = (@_);
+ my $datepart = "";
+ if (defined $starttime) {
+ $datepart = "and bugs_activity.when >= $starttime";
+ }
+ my $query = "
+ select bugs_activity.field, bugs_activity.when,
+ bugs_activity.oldvalue, bugs_activity.newvalue,
+ profiles.login_name
+ from bugs_activity,profiles
+ where bugs_activity.bug_id = $id $datepart
+ and profiles.userid = bugs_activity.who
+ order by bugs_activity.when";
+
+ SendSQL($query);
+
+ print "<table border cellpadding=4>\n";
+ print "<tr>\n";
+ print " <th>Who</th><th>What</th><th>Old value</th><th>New value</th><th>When</th>\n";
+ print "</tr>\n";
+
+ my @row;
+ while (@row = FetchSQLData()) {
+ my ($field,$when,$old,$new,$who) = (@row);
+ $old = value_quote($old);
+ $new = value_quote($new);
+ if ($old eq "") {
+ $old = "&nbsp;";
+ }
+ if ($new eq "") {
+ $new = "&nbsp;";
+ }
+ print "<tr>\n";
+ print "<td>$who</td>\n";
+ print "<td>$field</td>\n";
+ print "<td>$old</td>\n";
+ print "<td>$new</td>\n";
+ print "<td>$when</td>\n";
+ print "</tr>\n";
+ }
+ print "</table>\n";
+}
+
+
+