summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Pg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB/Pg.pm')
-rw-r--r--Bugzilla/DB/Pg.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index d06decaa3..66ad4b1ec 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -93,17 +93,19 @@ sub bz_last_key {
}
sub sql_regexp {
- my ($self, $expr, $pattern, $nocheck) = @_;
+ my ($self, $expr, $pattern, $nocheck, $real_pattern) = @_;
+ $real_pattern ||= $pattern;
- $self->bz_check_regexp($pattern) if !$nocheck;
+ $self->bz_check_regexp($real_pattern) if !$nocheck;
return "$expr ~* $pattern";
}
sub sql_not_regexp {
- my ($self, $expr, $pattern, $nocheck) = @_;
+ my ($self, $expr, $pattern, $nocheck, $real_pattern) = @_;
+ $real_pattern ||= $pattern;
- $self->bz_check_regexp($pattern) if !$nocheck;
+ $self->bz_check_regexp($real_pattern) if !$nocheck;
return "$expr !~* $pattern"
}