diff options
author | lpsolit%gmail.com <> | 2008-12-03 08:00:43 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-12-03 08:00:43 +0100 |
commit | 33429813a654f7a93a7be40b35e9fb7629d74dab (patch) | |
tree | 90414530e55ab4ea692c7d193f38f0e2c9f6653a /Bugzilla/DB/Oracle.pm | |
parent | f21dafef9ba8f687094aa944e93bc229c0491e50 (diff) | |
download | bugzilla-33429813a654f7a93a7be40b35e9fb7629d74dab.tar.gz bugzilla-33429813a654f7a93a7be40b35e9fb7629d74dab.tar.xz |
Bug 463688: editusers.cgi no longer lets you search for users using regular expressions - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat r=xiaoou a=LpSolit
Diffstat (limited to 'Bugzilla/DB/Oracle.pm')
-rw-r--r-- | Bugzilla/DB/Oracle.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 854b72a43..833fce635 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -99,7 +99,7 @@ sub bz_check_regexp { my ($self, $pattern) = @_; eval { $self->do("SELECT 1 FROM DUAL WHERE " - . $self->sql_regexp($self->quote("a"), $self->quote($pattern), 1)) }; + . $self->sql_regexp($self->quote("a"), $pattern, 1)) }; $@ && ThrowUserError('illegal_regexp', { value => $pattern, dberror => $self->errstr }); @@ -115,17 +115,19 @@ sub bz_explain { } 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 "REGEXP_LIKE($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 "NOT REGEXP_LIKE($expr, $pattern)" } |