summaryrefslogtreecommitdiffstats
path: root/sidebar.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'sidebar.cgi')
-rwxr-xr-xsidebar.cgi36
1 files changed, 5 insertions, 31 deletions
diff --git a/sidebar.cgi b/sidebar.cgi
index 073a1ecff..385086b5b 100755
--- a/sidebar.cgi
+++ b/sidebar.cgi
@@ -22,39 +22,13 @@ use lib ".";
require "CGI.pl";
# Shut up "Used Only Once" errors
-use vars qw { $anyvotesallowed };
-
-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(
+ $anyvotesallowed
+ $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 that tells us if the logged in user is in a specific group.
- 'UserInGroup' => \&UserInGroup ,
- };
-
+ConnectToDatabase();
# Needed for $::anyvotesallowed
GetVersionTable();