diff options
author | bbaetz%student.usyd.edu.au <> | 2002-02-13 10:27:20 +0000 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-02-13 10:27:20 +0000 |
commit | e1235d08fc52ff4cb914efecda9b15c2b7943f5a (patch) | |
tree | 2673752da715c22fabf9bacc440e48a943afeb82 /colchange.cgi | |
parent | Fix for bug 99024: checksetup was not giving proper permissions to the conten... (diff) | |
download | bugzilla-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar.gz bugzilla-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar.bz2 bugzilla-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.zip |
Bug 100094 - use generic template handling code
r=mattyt, afranke
Diffstat (limited to 'colchange.cgi')
-rwxr-xr-x | colchange.cgi | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/colchange.cgi b/colchange.cgi index 5d3222afc..f2ac55aa9 100755 --- a/colchange.cgi +++ b/colchange.cgi @@ -25,45 +25,15 @@ use strict; use lib qw(.); -sub sillyness { # shut up "used only once" warnings - my $zz = @::legal_keywords; - $zz = $::buffer; -} +use vars qw( + @legal_keywords + $buffer + $template + $vars +); require "CGI.pl"; -# Use the template toolkit (http://www.template-toolkit.org/) to generate -# the user interface (HTML pages and mail messages) using templates in the -# "template/" subdirectory. -use Template; - -# Create the global template object that processes templates and specify -# configuration parameters that apply to all templates processed in this script. -my $template = Template->new( -{ - # Colon-separated list of directories containing templates. - INCLUDE_PATH => "template/custom:template/default", - # Allow templates to be specified with relative paths. - RELATIVE => 1, - PRE_CHOMP => 1, -}); - -# Define the global variables and functions that will be passed to the UI -# template. Individual functions add their own values to this hash before -# sending them to the templates they process. -my $vars = -{ - # Function for retrieving global parameters. - 'Param' => \&Param, - - # Function for processing global parameters that contain references - # to other global parameters. - 'PerformSubsts' => \&PerformSubsts, - - # Function to search an array for a value - 'lsearch' => \&lsearch, -}; - print "Content-type: text/html\n"; # The master list not only says what fields are possible, but what order |