searchlib can use sql_ilike too!
This commit is contained in:
+2
-4
@@ -314,14 +314,12 @@ function search_generate_SQL($parsetree, $datafield, $metafield, $mainidfield, $
|
||||
$userfirstnamefield, $userlastnamefield, $timefield, $instancefield) {
|
||||
global $CFG;
|
||||
|
||||
$LIKE = sql_ilike();
|
||||
$NOTLIKE = 'NOT ' . $LIKE;
|
||||
if ($CFG->dbtype == "postgres7") {
|
||||
$LIKE = "ILIKE"; // case-insensitive
|
||||
$NOTLIKE = "NOT ILIKE"; // case-insensitive
|
||||
$REGEXP = "~*";
|
||||
$NOTREGEXP = "!~*";
|
||||
} else {
|
||||
$LIKE = "LIKE";
|
||||
$NOTLIKE = "NOT LIKE";
|
||||
$REGEXP = "REGEXP";
|
||||
$NOTREGEXP = "NOT REGEXP";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user