Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
18e840ac
Commit
18e840ac
authored
Sep 14, 2003
by
Dries
Browse files
- Bugfix: fixed string being check_query()-ed twice. Bug
#2425
. Patch by Matt.
parent
9801a196
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
18e840ac
...
...
@@ -391,7 +391,7 @@ function search_data($keys = NULL) {
if
(
isset
(
$keys
))
{
foreach
(
module_list
()
as
$name
)
{
if
(
module_hook
(
$name
,
"search"
)
&&
(
!
$edit
[
"type"
]
||
$edit
[
"type"
][
$name
])
&&
(
$result
=
module_invoke
(
$name
,
"search"
,
check_query
(
$keys
)))
)
{
if
(
module_hook
(
$name
,
"search"
)
&&
(
!
$edit
[
"type"
]
||
$edit
[
"type"
][
$name
])
&&
(
$result
=
module_invoke
(
$name
,
"search"
,
$keys
)))
{
if
(
$name
==
"node"
||
$name
==
"comment"
)
{
$output
.
=
"<p><b>"
.
t
(
"Matching "
.
$name
.
"s ranked in order of relevance"
)
.
":</b></p>"
;
}
...
...
modules/user.module
View file @
18e840ac
...
...
@@ -351,7 +351,7 @@ function user_perm() {
function
user_search
(
$keys
)
{
$result
=
db_query_range
(
"SELECT * FROM
{
users
}
WHERE name LIKE '%
$keys
%'"
,
0
,
20
);
$result
=
db_query_range
(
"SELECT * FROM
{
users
}
WHERE name LIKE '%
"
.
check_query
(
$keys
)
.
"
%'"
,
0
,
20
);
while
(
$account
=
db_fetch_object
(
$result
))
{
$find
[
$i
++
]
=
array
(
"title"
=>
$account
->
name
,
"link"
=>
(
strstr
(
request_uri
(),
"admin"
)
?
url
(
"admin/user/edit/
$account->uid
"
)
:
url
(
"user/view/
$account->uid
"
)),
"user"
=>
$account
->
name
);
}
...
...
modules/user/user.module
View file @
18e840ac
...
...
@@ -351,7 +351,7 @@ function user_perm() {
function
user_search
(
$keys
)
{
$result
=
db_query_range
(
"SELECT * FROM
{
users
}
WHERE name LIKE '%
$keys
%'"
,
0
,
20
);
$result
=
db_query_range
(
"SELECT * FROM
{
users
}
WHERE name LIKE '%
"
.
check_query
(
$keys
)
.
"
%'"
,
0
,
20
);
while
(
$account
=
db_fetch_object
(
$result
))
{
$find
[
$i
++
]
=
array
(
"title"
=>
$account
->
name
,
"link"
=>
(
strstr
(
request_uri
(),
"admin"
)
?
url
(
"admin/user/edit/
$account->uid
"
)
:
url
(
"user/view/
$account->uid
"
)),
"user"
=>
$account
->
name
);
}
...
...
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