diff options
author | terry%mozilla.org <> | 1999-05-26 02:22:30 +0000 |
---|---|---|
committer | terry%mozilla.org <> | 1999-05-26 02:22:30 +0000 |
commit | 6c926fc14f987a047f1db3a793556f98f271b9f2 (patch) | |
tree | 18181945805bf9950e31800de3cfee19472d1fd1 /CGI.pl | |
parent | 124da23d3fe33a23826f590528901ca3b05e7b13 (diff) | |
download | bugs-6c926fc14f987a047f1db3a793556f98f271b9f2.tar bugs-6c926fc14f987a047f1db3a793556f98f271b9f2.tar.gz bugs-6c926fc14f987a047f1db3a793556f98f271b9f2.tar.bz2 bugs-6c926fc14f987a047f1db3a793556f98f271b9f2.tar.xz bugs-6c926fc14f987a047f1db3a793556f98f271b9f2.zip |
Avoid mid-air collisions (implementing a suggestion by
py8ieh=bugzilla@bath.ac.uk).
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"; +} + + + |