aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-02-13 10:27:20 +0000
committerbbaetz%student.usyd.edu.au <>2002-02-13 10:27:20 +0000
commite1235d08fc52ff4cb914efecda9b15c2b7943f5a (patch)
tree2673752da715c22fabf9bacc440e48a943afeb82 /index.cgi
parentFix for bug 99024: checksetup was not giving proper permissions to the conten... (diff)
downloadbugzilla-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar.gz
bugzilla-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.tar.bz2
bugzilla-e1235d08fc52ff4cb914efecda9b15c2b7943f5a.zip
Bug 100094 - use generic template handling code
r=mattyt, afranke
Diffstat (limited to 'index.cgi')
-rwxr-xr-xindex.cgi35
1 files changed, 5 insertions, 30 deletions
diff --git a/index.cgi b/index.cgi
index 5c300992d..2fe393391 100755
--- a/index.cgi
+++ b/index.cgi
@@ -37,38 +37,13 @@ use strict;
use lib ".";
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,
- POST_CHOMP => 1,
- }
+use vars qw(
+ $template
+ $vars
);
-# 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
- };
+# Establish a connection to the database backend.
+ConnectToDatabase();
# Check whether or not the user is logged in and, if so, set the $::userid
# and $::usergroupset variables.