From 4727e6c09f88e63f02e6c8f359862d0c0942ed36 Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Wed, 16 Sep 1998 04:49:23 +0000 Subject: Everything has been ported to now run under Perl. --- show_activity.cgi | 69 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 32 deletions(-) (limited to 'show_activity.cgi') diff --git a/show_activity.cgi b/show_activity.cgi index 835b740b6..70f4c253f 100755 --- a/show_activity.cgi +++ b/show_activity.cgi @@ -1,5 +1,5 @@ -#! /usr/bonsaitools/bin/mysqltcl -# -*- Mode: tcl; indent-tabs-mode: nil -*- +#!/usr/bonsaitools/bin/perl -w +# -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public License # Version 1.0 (the "License"); you may not use this file except in @@ -19,40 +19,45 @@ # # Contributor(s): Terry Weissman -source "CGI.tcl" -puts "Content-type: text/html\n" +use diagnostics; +use strict; -puts " -

Changes made to bug $FORM(id)

-" -set query " +require "CGI.pl"; + +print "Content-type: text/html\n\n"; + +PutHeader("Changes made to bug $::FORM{'id'}", "Activity log", + "Bug $::FORM{'id'}"); + +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 = $FORM(id) + where bugs_activity.bug_id = $::FORM{'id'} and profiles.userid = bugs_activity.who - order by bugs_activity.when" - -ConnectToDatabase -SendSQL $query - -puts "" -puts "" -puts " " -puts "" - -while { [MoreSQLData] } { - set value [FetchSQLData] - lassign $value field when old new who - - puts "" - puts "" - puts "" - puts "" - puts "" - puts "" - puts "" + order by bugs_activity.when"; + +ConnectToDatabase(); +SendSQL($query); + +print "
WhoWhatOld valueNew valueWhen
$who$field[value_quote $old][value_quote $new]$when
\n"; +print "\n"; +print " \n"; +print "\n"; + +my @row; +while (@row = FetchSQLData()) { + my ($field,$when,$old,$new,$who) = (@row); + $old = value_quote($old); + $new = value_quote($new); + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; } -puts "
WhoWhatOld valueNew valueWhen
$who$field$old$new$when
" -puts "
Back to bug $FORM(id)" +print "\n"; +print "
Back to bug $::FORM{'id'}\n"; -- cgit v1.2.3-24-g4f1b