aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2019-11-30 23:12:11 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2019-12-01 14:53:51 -0800
commit70780e40e5586c6882e33dd65a3dc3f31031a321 (patch)
tree51fc3608bd44e7b92d07a976ca3112fd5d87d843 /custom_buglist.cgi
parentMerge commit '3395d78cc8b0bd660e56f73a2689d495f2a22628' into bugstest (diff)
downloadbugzilla-70780e40e5586c6882e33dd65a3dc3f31031a321.tar.gz
bugzilla-70780e40e5586c6882e33dd65a3dc3f31031a321.tar.bz2
bugzilla-70780e40e5586c6882e33dd65a3dc3f31031a321.zip
Gentoo-local version of 7f3a749d7bd78a3e4aee163f562d7e95b0954b44 w/ Perl-Tidy-20180220
Reformat all code using Perl-Tidy v20180220 and .perltidyrc from matching upstream 7f3a749d7bd78a3e4aee163f562d7e95b0954b44 commit. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'custom_buglist.cgi')
-rwxr-xr-xcustom_buglist.cgi86
1 files changed, 40 insertions, 46 deletions
diff --git a/custom_buglist.cgi b/custom_buglist.cgi
index 2e383fd74..81631032e 100755
--- a/custom_buglist.cgi
+++ b/custom_buglist.cgi
@@ -10,45 +10,45 @@ use Bugzilla;
use Bugzilla::Constants;
use Bugzilla::Util;
-my $cgi = Bugzilla->cgi;
-my $template = Bugzilla->template;
-my $vars = {};
-my $dbh = Bugzilla->switch_to_shadow_db();
+my $cgi = Bugzilla->cgi;
+my $template = Bugzilla->template;
+my $vars = {};
+my $dbh = Bugzilla->switch_to_shadow_db();
my @bindValues;
-print $cgi->header(-type=>'text/html');
-my $reso = $cgi->param('reso');
+print $cgi->header(-type => 'text/html');
+my $reso = $cgi->param('reso');
my $status = $cgi->param('status');
-my $since = $cgi->param('since');
+my $since = $cgi->param('since');
$status = undef unless defined($status);
-$reso = undef unless defined($reso);
-$since = undef unless defined($since) and $since =~ /^[0-9]+/;
+$reso = undef unless defined($reso);
+$since = undef unless defined($since) and $since =~ /^[0-9]+/;
-trick_taint($reso) if defined($reso);
+trick_taint($reso) if defined($reso);
trick_taint($status) if defined($status);
-trick_taint($since) if defined($since);
+trick_taint($since) if defined($since);
# SELECT profiles.login_name,bugs.bug_id,short_desc,priority,resolution,rep_platform,bug_status,bug_severity,profilesb.login_name AS reporter FROM bugs LEFT JOIN profiles ON bugs.assigned_to = profiles.userid LEFT JOIN profiles AS profilesb ON bugs.reporter = profilesb.userid LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id WHERE bugs.bug_id=160786 AND (bug_group_map.group_id IS NULL OR bug_group_map.group_id!=24)
my @bindValues2;
-my ($reso_sql, $status_sql, $since_sql);
+my ($reso_sql, $status_sql, $since_sql);
my ($reso_desc, $status_desc, $since_desc);
-$reso_sql = $status_sql = $since_sql = '1';
+$reso_sql = $status_sql = $since_sql = '1';
$reso_desc = $status_desc = $since_desc = '';
-if(defined($reso)) {
- $reso_sql = 'resolution=?';
- push(@bindValues2, $reso);
- $reso_desc = 'with resolution '.$reso;
+if (defined($reso)) {
+ $reso_sql = 'resolution=?';
+ push(@bindValues2, $reso);
+ $reso_desc = 'with resolution ' . $reso;
}
-if(defined($status)) {
- $status_sql = 'bug_status=?';
- push(@bindValues2, $status);
- $status_desc = 'with status '.$status;
+if (defined($status)) {
+ $status_sql = 'bug_status=?';
+ push(@bindValues2, $status);
+ $status_desc = 'with status ' . $status;
}
-if(defined($since)) {
- $since_sql = 'since=?';
- push(@bindValues2, $since);
- $since_desc = 'since '.$since;
+if (defined($since)) {
+ $since_sql = 'since=?';
+ push(@bindValues2, $since);
+ $since_desc = 'since ' . $since;
}
my $query2 = sprintf 'SELECT
bugs.bug_id, short_desc, priority,
@@ -58,33 +58,27 @@ my $query2 = sprintf 'SELECT
WHERE bug_group_map.group_id IS NULL
AND %s
AND %s
- AND %s',
- $reso_sql,
- $status_sql,
- $since_sql;
+ AND %s', $reso_sql, $status_sql, $since_sql;
#print Dumper($vars);
-my $title = sprintf "Bug listing %s %s %s as at %s",$status_desc,$reso_desc,$since_desc,DateTime->now->strftime("%Y/%m/%d %H:%M:%S");
-print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">'."\n";
+my $title = sprintf "Bug listing %s %s %s as at %s", $status_desc, $reso_desc,
+ $since_desc, DateTime->now->strftime("%Y/%m/%d %H:%M:%S");
+print
+ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">'
+ . "\n";
printf "<head><title>$title</title></head>\n";
-printf "<body><h1>%s</h1>\n",$title;
-my $actions = $dbh->selectall_arrayref(
- $query2,
- { Slice => {} },
- @bindValues2
-);
+printf "<body><h1>%s</h1>\n", $title;
+my $actions = $dbh->selectall_arrayref($query2, {Slice => {}}, @bindValues2);
my $counter = 0;
print "<div><ul>";
foreach my $row (@$actions) {
- printf "<li><a href='%s%d'>Bug:%d - \"<em>%s</em>\" status:%s resolution:%s severity:%s</a></li>\n",
- correct_urlbase(),
- $row->{'bug_id'}, $row->{'bug_id'},
- html_quote($row->{'short_desc'}),
- $row->{'bug_status'},
- $row->{'resolution'},
- $row->{'bug_severity'};
- $counter++;
+ printf
+ "<li><a href='%s%d'>Bug:%d - \"<em>%s</em>\" status:%s resolution:%s severity:%s</a></li>\n",
+ correct_urlbase(), $row->{'bug_id'}, $row->{'bug_id'},
+ html_quote($row->{'short_desc'}), $row->{'bug_status'}, $row->{'resolution'},
+ $row->{'bug_severity'};
+ $counter++;
}
-printf "</ul>Done. Count=%d</div></body></html>\n",$counter;
+printf "</ul>Done. Count=%d</div></body></html>\n", $counter;