Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e0e29ebe
Commit
e0e29ebe
authored
Mar 23, 2010
by
Evan Goldenberg
Browse files
explicitly cast text to integer to prevent postgres errors
Signed-off-by:
Evan Goldenberg
<
evang@catalyst.net.nz
>
parent
8c5a6fdd
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/search/internal/lib.php
View file @
e0e29ebe
...
...
@@ -107,7 +107,7 @@ class PluginSearchInternal extends PluginSearch {
$querydata
=
split
(
' '
,
preg_replace
(
'/\s\s+/'
,
' '
,
strtolower
(
trim
(
$query_string
))));
$hidenameallowed
=
get_config
(
'userscanhiderealnames'
)
?
'TRUE'
:
'FALSE'
;
$namesql
=
"(u.preferredname
$ilike
'%' || ? || '%')
OR ((u.preferredname IS NULL OR u.preferredname = '' OR NOT
$hidenameallowed
OR h.value <> 1)
OR ((u.preferredname IS NULL OR u.preferredname = '' OR NOT
$hidenameallowed
OR h.value
::integer
<> 1)
AND (u.firstname
$ilike
'%' || ? || '%' OR u.lastname
$ilike
'%' || ? || '%'))
OR (a.artefacttype IN
$fieldlist
AND ( a.title
$ilike
'%' || ? || '%'))"
;
...
...
Write
Preview
Supports
Markdown
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