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 /editattachstatuses.cgi | |
parent | 5938698d13c326114857aaebb34a0f7081e1d486 (diff) | |
download | bugs-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar bugs-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar.gz bugs-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar.bz2 bugs-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar.xz bugs-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.zip |
Bug 100094 - use generic template handling code
r=mattyt, afranke
Diffstat (limited to 'editattachstatuses.cgi')
-rwxr-xr-x | editattachstatuses.cgi | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/editattachstatuses.cgi b/editattachstatuses.cgi index 6596a79c9..0642d6bb8 100755 --- a/editattachstatuses.cgi +++ b/editattachstatuses.cgi @@ -29,41 +29,17 @@ use diagnostics; use strict; +use vars qw( + $template + $vars +); + # Include the Bugzilla CGI and general utility library. require "CGI.pl"; # Establish a connection to the database backend. ConnectToDatabase(); -# 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 - } -); - -# 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 - }; - # Make sure the user is logged in and is allowed to edit products # (i.e. the user has "editcomponents" privileges), since attachment # statuses are product-specific. |