diff options
Diffstat (limited to 'CGI.pl')
-rw-r--r-- | CGI.pl | 46 |
1 files changed, 46 insertions, 0 deletions
@@ -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 = " "; + } + if ($new eq "") { + $new = " "; + } + 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"; +} + + + |