Permalink
Browse files

MDL-7856 - make database search case-insensitive for PostgreSQL too.

Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
  • Loading branch information...
cataluke
cataluke committed Apr 17, 2007
1 parent a1e080f commit c8c765c0ab435d03249bb555cdc40a5d26404302
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/data/view.php
View
@@ -394,7 +394,7 @@
}
}
elseif ($search) {
- $searchselect = ' AND (dc.content LIKE "%'.$search.'%") ';
+ $searchselect = ' AND (c1.content ' . sql_ilike() . " '%$search%') "; //Be case-insensitive
} else {
$searchselect = ' ';
}
@@ -416,7 +416,7 @@
}
}
else {
- $searchselect = ' AND (c.content LIKE "%'.$search.'%") ';
+ $searchselect = ' AND (c.content ' . sql_ilike() . " '%$search%') "; //Be case-insensitive
}

0 comments on commit c8c765c

Please sign in to comment.