Permalink
Browse files

searchlib can use sql_ilike too!

  • Loading branch information...
1 parent a8f4522 commit 7e034f29a096b2bba357e4da15414c5aaf9428e1 martinlanghoff committed Sep 26, 2006
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/searchlib.php
View
@@ -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";
}

0 comments on commit 7e034f2

Please sign in to comment.