2003-03-27 00:07:02 +00:00
|
|
|
#!/usr/bin/perl -wT
|
2001-12-12 22:41:19 +00:00
|
|
|
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public
|
|
|
|
# License Version 1.1 (the "License"); you may not use this file
|
|
|
|
# except in compliance with the License. You may obtain a copy of
|
|
|
|
# the License at http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
# implied. See the License for the specific language governing
|
|
|
|
# rights and limitations under the License.
|
|
|
|
#
|
|
|
|
# The Original Code is the Bugzilla Bug Tracking System.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape Communications
|
|
|
|
# Corporation. Portions created by Netscape are
|
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
# Rights Reserved.
|
|
|
|
#
|
2002-08-27 04:28:05 +00:00
|
|
|
# Contributor(s): Jacob Steenhagen <jake@bugzilla.org>
|
2001-12-12 22:41:19 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Script Initialization
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
# Make it harder for us to do dangerous things in Perl.
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
# Include the Bugzilla CGI and general utility library.
|
|
|
|
use lib ".";
|
2005-08-10 01:30:41 +00:00
|
|
|
require "globals.pl";
|
2001-12-12 22:41:19 +00:00
|
|
|
|
2005-10-30 21:31:29 +00:00
|
|
|
# Check whether or not the user is logged in
|
2004-03-27 03:51:44 +00:00
|
|
|
use Bugzilla::Constants;
|
|
|
|
Bugzilla->login(LOGIN_OPTIONAL);
|
2001-12-12 22:41:19 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Main Body Execution
|
|
|
|
###############################################################################
|
|
|
|
|
2003-05-05 01:15:38 +00:00
|
|
|
my $cgi = Bugzilla->cgi;
|
2005-08-21 19:27:40 +00:00
|
|
|
# Force to use HTTPS unless Param('ssl') equals 'never'.
|
|
|
|
# This is required because the user may want to log in from here.
|
|
|
|
if (Param('sslbase') ne '' and Param('ssl') ne 'never') {
|
|
|
|
$cgi->require_https(Param('sslbase'));
|
|
|
|
}
|
|
|
|
|
2004-02-14 10:54:51 +00:00
|
|
|
my $template = Bugzilla->template;
|
2001-12-12 22:41:19 +00:00
|
|
|
|
|
|
|
# Return the appropriate HTTP response headers.
|
2003-05-05 01:15:38 +00:00
|
|
|
print $cgi->header();
|
2001-12-12 22:41:19 +00:00
|
|
|
|
|
|
|
# Generate and return the UI (HTML page) from the appropriate template.
|
2005-10-24 23:11:56 +00:00
|
|
|
$template->process("index.html.tmpl")
|
2002-04-24 07:24:50 +00:00
|
|
|
|| ThrowTemplateError($template->error());
|