Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
db654f60
Commit
db654f60
authored
Feb 17, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 280495: Replace "REGEXP" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=wurblzap, a=myk
parent
62b2ec34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
Search.pm
Bugzilla/Search.pm
+8
-5
editusers.cgi
editusers.cgi
+3
-3
No files found.
Bugzilla/Search.pm
View file @
db654f60
...
...
@@ -95,6 +95,8 @@ sub init {
my
@andlist
;
my
%
chartfields
;
my
$dbh
=
Bugzilla
->
dbh
;
&::
GetVersionTable
();
# First, deal with all the old hard-coded non-chart-based poop.
...
...
@@ -677,9 +679,9 @@ sub init {
}
elsif
(
$t
eq
"notequal"
)
{
$oper
=
"<>"
;
}
elsif
(
$t
eq
"regexp"
)
{
$oper
=
"REGEXP"
;
$oper
=
$dbh
->
sql_regexp
()
;
}
elsif
(
$t
eq
"notregexp"
)
{
$oper
=
"NOT REGEXP"
;
$oper
=
$dbh
->
sql_not_regexp
()
;
}
else
{
$oper
=
"noop"
;
}
...
...
@@ -950,10 +952,10 @@ sub init {
$term
=
"INSTR(LOWER($ff), "
.
lc
(
$q
)
.
") = 0"
;
},
",regexp"
=>
sub
{
$term
=
"LOWER($ff)
REGEXP
$q"
;
$term
=
"LOWER($ff)
"
.
$dbh
->
sql_regexp
()
.
"
$q"
;
},
",notregexp"
=>
sub
{
$term
=
"LOWER($ff)
NOT REGEXP
$q"
;
$term
=
"LOWER($ff)
"
.
$dbh
->
sql_not_regexp
()
.
"
$q"
;
},
",lessthan"
=>
sub
{
$term
=
"$ff < $q"
;
...
...
@@ -1434,6 +1436,7 @@ sub build_subselect {
sub
GetByWordList
{
my
(
$field
,
$strs
)
=
(
@_
);
my
@list
;
my
$dbh
=
Bugzilla
->
dbh
;
foreach
my
$w
(
split
(
/[\s,]+/
,
$strs
))
{
my
$word
=
$w
;
...
...
@@ -1443,7 +1446,7 @@ sub GetByWordList {
$word
=~
s/^'//
;
$word
=~
s/'$//
;
$word
=
'(^|[^a-z0-9])'
.
$word
.
'($|[^a-z0-9])'
;
push
(
@list
,
"lower($field)
regexp
'$word'"
);
push
(
@list
,
"lower($field)
"
.
$dbh
->
sql_regexp
()
.
"
'$word'"
);
}
}
...
...
editusers.cgi
View file @
db654f60
...
...
@@ -260,7 +260,7 @@ my $action = trim($::FORM{action} || '');
my
$localtrailer
=
'<a href="editusers.cgi?">edit more users</a>'
;
my
$candelete
=
Param
(
'allowuserdeletion'
);
my
$dbh
=
Bugzilla
->
dbh
;
#
# action='' -> Ask for match string for users.
...
...
@@ -302,11 +302,11 @@ if ($action eq 'list') {
$query
.=
"like"
;
$matchstr
=
'%'
.
$matchstr
.
'%'
;
}
elsif
(
$::FORM
{
'matchtype'
}
eq
'regexp'
)
{
$query
.=
"regexp"
;
$query
.=
$dbh
->
sql_regexp
()
;
$matchstr
=
'.'
unless
$matchstr
;
}
elsif
(
$::FORM
{
'matchtype'
}
eq
'notregexp'
)
{
$query
.=
"not regexp"
;
$query
.=
$dbh
->
sql_not_regexp
()
;
$matchstr
=
'.'
unless
$matchstr
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment