Commit f91e240a authored by Perl Tidy's avatar Perl Tidy Committed by Dylan William Hardison

no bug - perltidy again, using the latest release

blame jeff
parent 9d2417c9
...@@ -35,10 +35,8 @@ sub _init_bz_cgi_globals { ...@@ -35,10 +35,8 @@ sub _init_bz_cgi_globals {
# We don't precompile any functions here, that's done specially in # We don't precompile any functions here, that's done specially in
# mod_perl code. # mod_perl code.
$invocant->_setup_symbols( $invocant->_setup_symbols(qw(:no_xhtml :oldstyle_urls :private_tempfiles
qw(:no_xhtml :oldstyle_urls :private_tempfiles :unique_headers));
:unique_headers)
);
} }
BEGIN { __PACKAGE__->_init_bz_cgi_globals() if i_am_cgi(); } BEGIN { __PACKAGE__->_init_bz_cgi_globals() if i_am_cgi(); }
......
...@@ -1843,8 +1843,7 @@ sub _convert_groups_system_from_groupset { ...@@ -1843,8 +1843,7 @@ sub _convert_groups_system_from_groupset {
my ($admin_gid) my ($admin_gid)
= $dbh->selectrow_array("SELECT id FROM groups WHERE name = 'admin'"); = $dbh->selectrow_array("SELECT id FROM groups WHERE name = 'admin'");
if (!$admin_gid) { if (!$admin_gid) {
$dbh->do( $dbh->do(q{INSERT INTO groups (name, description)
q{INSERT INTO groups (name, description)
VALUES ('admin', 'Administrators')} VALUES ('admin', 'Administrators')}
); );
$admin_gid = $dbh->bz_last_key('groups', 'id'); $admin_gid = $dbh->bz_last_key('groups', 'id');
...@@ -3362,8 +3361,7 @@ sub _initialize_workflow_for_upgrade { ...@@ -3362,8 +3361,7 @@ sub _initialize_workflow_for_upgrade {
sub _make_lang_setting_dynamic { sub _make_lang_setting_dynamic {
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
my $count = $dbh->selectrow_array( my $count = $dbh->selectrow_array(q{SELECT 1 FROM setting
q{SELECT 1 FROM setting
WHERE name = 'lang' WHERE name = 'lang'
AND subclass IS NULL} AND subclass IS NULL}
); );
...@@ -4187,8 +4185,7 @@ sub _update_alias { ...@@ -4187,8 +4185,7 @@ sub _update_alias {
return unless $dbh->bz_column_info('bugs', 'alias'); return unless $dbh->bz_column_info('bugs', 'alias');
# We need to move the aliases from the bugs table to the bugs_aliases table # We need to move the aliases from the bugs table to the bugs_aliases table
$dbh->do( $dbh->do(q{
q{
INSERT INTO bugs_aliases (bug_id, alias) INSERT INTO bugs_aliases (bug_id, alias)
SELECT bug_id, alias FROM bugs WHERE alias IS NOT NULL SELECT bug_id, alias FROM bugs WHERE alias IS NOT NULL
} }
......
...@@ -63,14 +63,12 @@ use constant APACHE => qw(apachectl httpd apache2 apache); ...@@ -63,14 +63,12 @@ use constant APACHE => qw(apachectl httpd apache2 apache);
# If we don't find any of the above binaries in the normal PATH, # If we don't find any of the above binaries in the normal PATH,
# these are extra places we look. # these are extra places we look.
use constant APACHE_PATH => [ use constant APACHE_PATH => [qw(
qw(
/usr/sbin /usr/sbin
/usr/local/sbin /usr/local/sbin
/usr/libexec /usr/libexec
/usr/local/libexec /usr/local/libexec
) )];
];
# The below two constants are subroutines so that they can implement # The below two constants are subroutines so that they can implement
# a hook. Other than that they are actually constants. # a hook. Other than that they are actually constants.
......
...@@ -85,12 +85,10 @@ sub FIELD_MAP { ...@@ -85,12 +85,10 @@ sub FIELD_MAP {
# Also, don't allow searching the _accessible stuff via quicksearch # Also, don't allow searching the _accessible stuff via quicksearch
# (both because it's unnecessary and because otherwise # (both because it's unnecessary and because otherwise
# "reporter_accessible" and "reporter" both match "rep". # "reporter_accessible" and "reporter" both match "rep".
delete @full_map{ delete @full_map{qw(rep_platform bug_status bug_file_loc bug_group
qw(rep_platform bug_status bug_file_loc bug_group
bug_severity bug_status bug_severity bug_status
status_whiteboard status_whiteboard
cclist_accessible reporter_accessible) cclist_accessible reporter_accessible)};
};
Bugzilla::Hook::process('quicksearch_map', {'map' => \%full_map}); Bugzilla::Hook::process('quicksearch_map', {'map' => \%full_map});
......
...@@ -153,16 +153,14 @@ sub _update_groups { ...@@ -153,16 +153,14 @@ sub _update_groups {
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
# Update group settings. # Update group settings.
my $sth_add_mapping = $dbh->prepare( my $sth_add_mapping = $dbh->prepare(qq{INSERT INTO user_group_map (
qq{INSERT INTO user_group_map (
user_id, group_id, isbless, grant_type user_id, group_id, isbless, grant_type
) VALUES ( ) VALUES (
?, ?, ?, ? ?, ?, ?, ?
) )
} }
); );
my $sth_remove_mapping = $dbh->prepare( my $sth_remove_mapping = $dbh->prepare(qq{DELETE FROM user_group_map
qq{DELETE FROM user_group_map
WHERE user_id = ? WHERE user_id = ?
AND group_id = ? AND group_id = ?
AND isbless = ? AND isbless = ?
...@@ -1704,13 +1702,11 @@ sub derive_regexp_groups { ...@@ -1704,13 +1702,11 @@ sub derive_regexp_groups {
); );
$sth->execute($id, GRANT_REGEXP); $sth->execute($id, GRANT_REGEXP);
my $group_insert = $dbh->prepare( my $group_insert = $dbh->prepare(q{INSERT INTO user_group_map
q{INSERT INTO user_group_map
(user_id, group_id, isbless, grant_type) (user_id, group_id, isbless, grant_type)
VALUES (?, ?, 0, ?)} VALUES (?, ?, 0, ?)}
); );
my $group_delete = $dbh->prepare( my $group_delete = $dbh->prepare(q{DELETE FROM user_group_map
q{DELETE FROM user_group_map
WHERE user_id = ? WHERE user_id = ?
AND group_id = ? AND group_id = ?
AND isbless = 0 AND isbless = 0
......
...@@ -149,8 +149,7 @@ sub add_setting { ...@@ -149,8 +149,7 @@ sub add_setting {
VALUES (?, ?, 1, ?)}, undef, ($name, $default_value, $subclass) VALUES (?, ?, 1, ?)}, undef, ($name, $default_value, $subclass)
); );
my $sth = $dbh->prepare( my $sth = $dbh->prepare(q{INSERT INTO setting_value (name, value, sortindex)
q{INSERT INTO setting_value (name, value, sortindex)
VALUES (?, ?, ?)} VALUES (?, ?, ?)}
); );
...@@ -232,8 +231,7 @@ sub set_default { ...@@ -232,8 +231,7 @@ sub set_default {
my ($setting_name, $default_value, $is_enabled) = @_; my ($setting_name, $default_value, $is_enabled) = @_;
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
my $sth = $dbh->prepare( my $sth = $dbh->prepare(q{UPDATE setting
q{UPDATE setting
SET default_value = ?, is_enabled = ? SET default_value = ?, is_enabled = ?
WHERE name = ?} WHERE name = ?}
); );
......
...@@ -29,8 +29,7 @@ use constant MORE_SUB_CLASSES => qw( ...@@ -29,8 +29,7 @@ use constant MORE_SUB_CLASSES => qw(
sub install_update_db { sub install_update_db {
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
my $should_rename = $dbh->selectrow_array( my $should_rename = $dbh->selectrow_array(q{SELECT 1 FROM bug_see_also
q{SELECT 1 FROM bug_see_also
WHERE class IN ('Bugzilla::BugUrl::Rietveld', WHERE class IN ('Bugzilla::BugUrl::Rietveld',
'Bugzilla::BugUrl::ReviewBoard')} 'Bugzilla::BugUrl::ReviewBoard')}
); );
......
...@@ -104,14 +104,12 @@ if ($cgi->param('createmissinggroupcontrolmapentries')) { ...@@ -104,14 +104,12 @@ if ($cgi->param('createmissinggroupcontrolmapentries')) {
my $na = CONTROLMAPNA; my $na = CONTROLMAPNA;
my $shown = CONTROLMAPSHOWN; my $shown = CONTROLMAPSHOWN;
my $insertsth = $dbh->prepare( my $insertsth = $dbh->prepare(qq{INSERT INTO group_control_map
qq{INSERT INTO group_control_map
(group_id, product_id, membercontrol, othercontrol) (group_id, product_id, membercontrol, othercontrol)
VALUES (?, ?, $shown, $na)} VALUES (?, ?, $shown, $na)}
); );
my $updatesth = $dbh->prepare( my $updatesth = $dbh->prepare(qq{UPDATE group_control_map
qq{UPDATE group_control_map
SET membercontrol = $shown SET membercontrol = $shown
WHERE group_id = ? WHERE group_id = ?
AND product_id = ?} AND product_id = ?}
...@@ -251,8 +249,7 @@ if ($cgi->param('rescanallBugMail')) { ...@@ -251,8 +249,7 @@ if ($cgi->param('rescanallBugMail')) {
Status('send_bugmail_start'); Status('send_bugmail_start');
my $time = $dbh->sql_date_math('NOW()', '-', 30, 'MINUTE'); my $time = $dbh->sql_date_math('NOW()', '-', 30, 'MINUTE');
my $list = $dbh->selectcol_arrayref( my $list = $dbh->selectcol_arrayref(qq{
qq{
SELECT bug_id SELECT bug_id
FROM bugs FROM bugs
WHERE (lastdiffed IS NULL WHERE (lastdiffed IS NULL
...@@ -742,8 +739,7 @@ sub check_keywords { ...@@ -742,8 +739,7 @@ sub check_keywords {
Status('keyword_check_start'); Status('keyword_check_start');
my %keywordids; my %keywordids;
my $keywords = $dbh->selectall_arrayref( my $keywords = $dbh->selectall_arrayref(q{SELECT id, name
q{SELECT id, name
FROM keyworddefs} FROM keyworddefs}
); );
...@@ -758,8 +754,7 @@ sub check_keywords { ...@@ -758,8 +754,7 @@ sub check_keywords {
} }
} }
my $sth = $dbh->prepare( my $sth = $dbh->prepare(q{SELECT bug_id, keywordid
q{SELECT bug_id, keywordid
FROM keywords FROM keywords
ORDER BY bug_id, keywordid} ORDER BY bug_id, keywordid}
); );
...@@ -860,8 +855,7 @@ sub BugCheck { ...@@ -860,8 +855,7 @@ sub BugCheck {
my ($middlesql, $errortext, $repairparam, $repairtext) = @_; my ($middlesql, $errortext, $repairparam, $repairtext) = @_;
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
my $badbugs = $dbh->selectcol_arrayref( my $badbugs = $dbh->selectcol_arrayref(qq{SELECT DISTINCT bugs.bug_id
qq{SELECT DISTINCT bugs.bug_id
FROM $middlesql FROM $middlesql
ORDER BY bugs.bug_id} ORDER BY bugs.bug_id}
); );
...@@ -996,8 +990,7 @@ BugCheck( ...@@ -996,8 +990,7 @@ BugCheck(
Status('unsent_bugmail_check'); Status('unsent_bugmail_check');
my $time = $dbh->sql_date_math('NOW()', '-', 30, 'MINUTE'); my $time = $dbh->sql_date_math('NOW()', '-', 30, 'MINUTE');
my $badbugs = $dbh->selectcol_arrayref( my $badbugs = $dbh->selectcol_arrayref(qq{
qq{
SELECT bug_id SELECT bug_id
FROM bugs FROM bugs
WHERE (lastdiffed IS NULL OR lastdiffed < delta_ts) WHERE (lastdiffed IS NULL OR lastdiffed < delta_ts)
......
...@@ -139,8 +139,7 @@ foreach my $i (split('[\s,]+', $cgi->param('id'))) { ...@@ -139,8 +139,7 @@ foreach my $i (split('[\s,]+', $cgi->param('id'))) {
my @stack = keys(%baselist); my @stack = keys(%baselist);
if ($display eq 'web') { if ($display eq 'web') {
my $sth = $dbh->prepare( my $sth = $dbh->prepare(q{SELECT blocked, dependson
q{SELECT blocked, dependson
FROM dependencies FROM dependencies
WHERE blocked = ? OR dependson = ?} WHERE blocked = ? OR dependson = ?}
); );
...@@ -184,8 +183,7 @@ foreach my $k (keys(%baselist)) { ...@@ -184,8 +183,7 @@ foreach my $k (keys(%baselist)) {
$seen{$k} = 1; $seen{$k} = 1;
} }
my $sth = $dbh->prepare( my $sth = $dbh->prepare(q{SELECT bug_status, resolution, short_desc
q{SELECT bug_status, resolution, short_desc
FROM bugs FROM bugs
WHERE bugs.bug_id = ?} WHERE bugs.bug_id = ?}
); );
......
...@@ -635,11 +635,9 @@ sub _create_one_bug { ...@@ -635,11 +635,9 @@ sub _create_one_bug {
# These are necessary for the changedfrom tests. # These are necessary for the changedfrom tests.
my $extra_values = $self->_extra_bug_create_values->{$number}; my $extra_values = $self->_extra_bug_create_values->{$number};
foreach my $field ( foreach my $field (qw(comments remaining_time percentage_complete
qw(comments remaining_time percentage_complete
keyword_objects everconfirmed dependson blocked keyword_objects everconfirmed dependson blocked
groups_in classification actual_time) groups_in classification actual_time))
)
{ {
$extra_values->{$field} = $bug->$field; $extra_values->{$field} = $bug->$field;
} }
......
...@@ -957,13 +957,11 @@ use constant INJECTION_BROKEN_FIELD => { ...@@ -957,13 +957,11 @@ use constant INJECTION_BROKEN_FIELD => {
'longdescs.count' => { 'longdescs.count' => {
search => 1, search => 1,
db_skip => ['Pg'], db_skip => ['Pg'],
operator_ok => [ operator_ok => [qw(allwords allwordssubstr anywordssubstr casesubstring
qw(allwords allwordssubstr anywordssubstr casesubstring
changedbefore changedafter greaterthan greaterthaneq changedbefore changedafter greaterthan greaterthaneq
lessthan lessthaneq notregexp notsubstring lessthan lessthaneq notregexp notsubstring
nowordssubstr regexp substring anywords nowordssubstr regexp substring anywords
notequals nowords equals anyexact) notequals nowords equals anyexact)],
],
}, },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment