aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2015-07-11 16:08:11 +0200
committerChristian Ruppert <idl0r@gentoo.org>2015-07-11 16:08:11 +0200
commitbf1988c8169ed4c5c50eb8bfda1dd2736d39cb33 (patch)
tree077237f351d9f9bb5616ce7b2edb8187e29715c3 /index.cgi
parentRemove files no longer kept in the upstream repo (diff)
parentVanilla 4.4.9 to 5.0 without history due to massive merge conflicts (diff)
downloadbugzilla-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-xindex.cgi27
1 files changed, 16 insertions, 11 deletions
diff --git a/index.cgi b/index.cgi
index 68352c084..15d34451d 100755
--- a/index.cgi
+++ b/index.cgi
@@ -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());