Commit 32f72753 authored by Evan Goldenberg's avatar Evan Goldenberg
Browse files

cast properly...



The last commit fixed postgres but broke mysql. Woops.
Signed-off-by: default avatarEvan Goldenberg <evang@catalyst.net.nz>
parent 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::integer <> 1)
OR ((u.preferredname IS NULL OR u.preferredname = '' OR NOT $hidenameallowed OR CAST(h.value AS INTEGER) <> 1)
AND (u.firstname $ilike '%' || ? || '%' OR u.lastname $ilike '%' || ? || '%'))
OR (a.artefacttype IN $fieldlist
AND ( a.title $ilike '%' || ? || '%'))";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment