summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-08-01 07:37:15 +0200
committermkanat%bugzilla.org <>2008-08-01 07:37:15 +0200
commit73a4dd56109c4799fd1d4ac7ed56ff72a47279bb (patch)
tree1b029a07667f48b1eb80507b815905ef9bb217f3 /buglist.cgi
parentd165b7785df760352ce17d3677691c5be0b3b6c4 (diff)
downloadbugzilla-73a4dd56109c4799fd1d4ac7ed56ff72a47279bb.tar.gz
bugzilla-73a4dd56109c4799fd1d4ac7ed56ff72a47279bb.tar.xz
Bug 440188: buglist.cgi should display EXPLAIN output when &debug=1
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi7
1 files changed, 7 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 86147869b..114523286 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -994,6 +994,13 @@ elsif ($fulltext) {
if ($cgi->param('debug')) {
$vars->{'debug'} = 1;
$vars->{'query'} = $query;
+ # Explains are limited to admins because you could use them to figure
+ # out how many hidden bugs are in a particular product (by doing
+ # searches and looking at the number of rows the explain says it's
+ # examining).
+ if (Bugzilla->user->in_group('admin')) {
+ $vars->{'query_explain'} = $dbh->bz_explain($query);
+ }
$vars->{'debugdata'} = $search->getDebugData();
}