aboutsummaryrefslogtreecommitdiffstats
path: root/index.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-06-13 00:13:34 +0000
committerlpsolit%gmail.com <>2006-06-13 00:13:34 +0000
commit3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4 (patch)
treeae6ebca77c751c1ac29bede5340fa8ba308494ca /index.cgi
parente36503867847944db6ef44491f0e8343b5faa591 (diff)
downloadbugs-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar
bugs-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar.gz
bugs-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar.bz2
bugs-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar.xz
bugs-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.zip
Bug 330487: Automatic Update Notification for Bugzilla - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'index.cgi')
-rwxr-xr-xindex.cgi15
1 files changed, 11 insertions, 4 deletions
diff --git a/index.cgi b/index.cgi
index a35be0726..27f26083d 100755
--- a/index.cgi
+++ b/index.cgi
@@ -19,7 +19,7 @@
# Rights Reserved.
#
# Contributor(s): Jacob Steenhagen <jake@bugzilla.org>
-#
+# Frédéric Buclin <LpSolit@gmail.com>
###############################################################################
# Script Initialization
@@ -32,9 +32,11 @@ use strict;
use lib ".";
require "globals.pl";
-# Check whether or not the user is logged in
use Bugzilla::Constants;
-Bugzilla->login(LOGIN_OPTIONAL);
+use Bugzilla::Update;
+
+# Check whether or not the user is logged in
+my $user = Bugzilla->login(LOGIN_OPTIONAL);
###############################################################################
# Main Body Execution
@@ -48,10 +50,15 @@ if (Param('sslbase') ne '' and Param('ssl') ne 'never') {
}
my $template = Bugzilla->template;
+my $vars = {};
# Return the appropriate HTTP response headers.
print $cgi->header();
+if ($user->in_group('admin')) {
+ $vars->{'release'} = Bugzilla::Update::get_notifications();
+}
+
# Generate and return the UI (HTML page) from the appropriate template.
-$template->process("index.html.tmpl")
+$template->process("index.html.tmpl", $vars)
|| ThrowTemplateError($template->error());