summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/DB.pm2
-rw-r--r--Bugzilla/Template.pm2
-rwxr-xr-xchecksetup.pl2
-rwxr-xr-ximportxml.pl22
4 files changed, 14 insertions, 14 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index d84ce873d..292925a6f 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -312,7 +312,7 @@ sub bz_setup_database {
my @desired_tables = $self->_bz_schema->get_table_list();
foreach my $table_name (@desired_tables) {
- next if grep /^$table_name$/, @current_tables;
+ next if grep($_ eq $table_name, @current_tables);
print "Creating table $table_name ...\n";
my @table_sql = $self->_bz_schema->get_table_ddl($table_name);
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 3e37ed5e7..29ed2924c 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -117,7 +117,7 @@ sub getTemplateIncludePath () {
# 'en-uk' etc. but not the otherway round. (This is unfortunally
# not very clearly stated in those RFC; see comment just over 14.5
# in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4)
- if(my @found = grep /^$lang(-.+)?$/i, @languages) {
+ if(my @found = grep /^\Q$lang\E(-.+)?$/i, @languages) {
push (@usedlanguages, @found);
}
}
diff --git a/checksetup.pl b/checksetup.pl
index 51a264391..08771fb43 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -773,7 +773,7 @@ if ($my_webservergroup && !$silent) {
# that we can't chgrp to
my $webservergid = (getgrnam($my_webservergroup))[2]
or die("no such group: $my_webservergroup");
- if ($< != 0 && !grep(/^$webservergid$/, split(" ", $)))) {
+ if ($< != 0 && !grep($_ eq $webservergid, split(" ", $)))) {
print <<EOF;
Warning: you have entered a value for the "webservergroup" parameter in
diff --git a/importxml.pl b/importxml.pl
index 9ff962635..8cf9a6179 100755
--- a/importxml.pl
+++ b/importxml.pl
@@ -422,8 +422,8 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
}
if (defined ($::versions{$product[0]} ) &&
- (my @version = grep /^$bug_fields{'version'}$/i,
- @{$::versions{$product[0]}}) ){
+ (my @version = grep(lc($_) eq lc($bug_fields{'version'}),
+ @{$::versions{$product[0]}})) ){
push (@values, SqlQuote($version[0]) );
push (@query, "version");
} else {
@@ -434,7 +434,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
}
if (defined ($bug_fields{'priority'}) &&
- (my @priority = grep /^$bug_fields{'priority'}$/i, @::legal_priority) ){
+ (my @priority = grep(lc($_) eq lc($bug_fields{'priority'}), @::legal_priority)) ){
push (@values, SqlQuote($priority[0]) );
push (@query, "priority");
} else {
@@ -446,7 +446,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
}
if (defined ($bug_fields{'rep_platform'}) &&
- (my @platform = grep /^$bug_fields{'rep_platform'}$/i, @::legal_platform) ){
+ (my @platform = grep(lc($_) eq lc($bug_fields{'rep_platform'}), @::legal_platform)) ){
push (@values, SqlQuote($platform[0]) );
push (@query, "rep_platform");
} else {
@@ -459,7 +459,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
}
if (defined ($bug_fields{'op_sys'}) &&
- (my @opsys = grep /^$bug_fields{'op_sys'}$/i, @::legal_opsys) ){
+ (my @opsys = grep(lc($_) eq lc($bug_fields{'op_sys'}), @::legal_opsys)) ){
push (@values, SqlQuote($opsys[0]) );
push (@query, "op_sys");
} else {
@@ -472,8 +472,8 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
if (Param("usetargetmilestone")) {
if (defined ($::target_milestone{$product[0]} ) &&
- (my @tm = grep /^$bug_fields{'target_milestone'}$/i,
- @{$::target_milestone{$product[0]}}) ){
+ (my @tm = grep(lc($_) eq lc($bug_fields{'target_milestone'}),
+ @{$::target_milestone{$product[0]}})) ){
push (@values, SqlQuote($tm[0]) );
push (@query, "target_milestone");
} else {
@@ -492,8 +492,8 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
}
if (defined ($bug_fields{'bug_severity'}) &&
- (my @severity= grep /^$bug_fields{'bug_severity'}$/i,
- @::legal_severity) ){
+ (my @severity= grep(lc($_) eq lc($bug_fields{'bug_severity'}),
+ @::legal_severity)) ){
push (@values, SqlQuote($severity[0]) );
push (@query, "bug_severity");
} else {
@@ -543,7 +543,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
my @resolution;
if (defined ($bug_fields{'resolution'}) &&
- (@resolution= grep /^$bug_fields{'resolution'}$/i, @::legal_resolution) ){
+ (@resolution= grep(lc($_) eq lc($bug_fields{'resolution'}), @::legal_resolution)) ){
push (@values, SqlQuote($resolution[0]) );
push (@query, "resolution");
} elsif ( (defined $bug_fields{'resolution'}) && (!$resolution[0]) ){
@@ -571,7 +571,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
$bug_fields{'bug_status'}:"unknown";
$err .= "\".\n";
} elsif (defined ($bug_fields{'bug_status'}) &&
- (my @status = grep /^$bug_fields{'bug_status'}$/i, @::legal_bug_status) ){
+ (my @status = grep(lc($_) eq lc($bug_fields{'bug_status'}), @::legal_bug_status)) ){
#if a bug status was set then use it, if its legal
push (@values, SqlQuote($status[0]));
push (@query, "bug_status");