diff options
author | 2015-07-11 16:08:11 +0200 | |
---|---|---|
committer | 2015-07-11 16:08:11 +0200 | |
commit | bf1988c8169ed4c5c50eb8bfda1dd2736d39cb33 (patch) | |
tree | 077237f351d9f9bb5616ce7b2edb8187e29715c3 /index.cgi | |
parent | Remove files no longer kept in the upstream repo (diff) | |
parent | Vanilla 4.4.9 to 5.0 without history due to massive merge conflicts (diff) | |
download | bugzilla-bf1988c8169ed4c5c50eb8bfda1dd2736d39cb33.tar.gz bugzilla-bf1988c8169ed4c5c50eb8bfda1dd2736d39cb33.tar.bz2 bugzilla-bf1988c8169ed4c5c50eb8bfda1dd2736d39cb33.zip |
Merge branch '4.4.9-to-5.0-vanilla-nohist' into 5.0-migration
Move @gentoo.org restriction for new accounts into the Gentoo extentions.
Reset some templates to vanilla/default. We'll use custom ones from now on
Diffstat (limited to 'index.cgi')
-rwxr-xr-x | index.cgi | 27 |
1 files changed, 16 insertions, 11 deletions
@@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -6,14 +6,10 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. -############################################################################### -# Script Initialization -############################################################################### - -# Make it harder for us to do dangerous things in Perl. +use 5.10.1; use strict; +use warnings; -# Include the Bugzilla CGI and general utility library. use lib qw(. lib); use Bugzilla; @@ -37,10 +33,6 @@ if ($cgi->param('logout')) { $cgi->delete('logout'); } -############################################################################### -# Main Body Execution -############################################################################### - # Return the appropriate HTTP response headers. print $cgi->header(); @@ -55,6 +47,19 @@ if ($user->in_group('admin')) { $vars->{'release'} = Bugzilla::Update::get_notifications(); } +if ($user->id) { + my $dbh = Bugzilla->dbh; + $vars->{assignee_count} = + $dbh->selectrow_array("SELECT COUNT(*) FROM bugs WHERE assigned_to = ? + AND resolution = ''", undef, $user->id); + $vars->{reporter_count} = + $dbh->selectrow_array("SELECT COUNT(*) FROM bugs WHERE reporter = ? + AND resolution = ''", undef, $user->id); + $vars->{requestee_count} = + $dbh->selectrow_array('SELECT COUNT(DISTINCT bug_id) FROM flags + WHERE requestee_id = ?', undef, $user->id); +} + # Generate and return the UI (HTML page) from the appropriate template. $template->process("index.html.tmpl", $vars) || ThrowTemplateError($template->error()); |