diff options
author | lpsolit%gmail.com <> | 2006-06-13 02:13:34 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-06-13 02:13:34 +0200 |
commit | 3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4 (patch) | |
tree | ae6ebca77c751c1ac29bede5340fa8ba308494ca /index.cgi | |
parent | e36503867847944db6ef44491f0e8343b5faa591 (diff) | |
download | bugzilla-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar.gz bugzilla-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar.xz |
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-x | index.cgi | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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()); |