Skip to content

Commit

Permalink
Log searching case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
crazedsanity committed May 5, 2014
1 parent ac01676 commit f8d41ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Please do NOT modify this file.

VERSION: 0.10.15
VERSION: 0.10.16
PROJECT: cs-webapplibs
12 changes: 5 additions & 7 deletions cs_webdblogger.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -785,16 +785,14 @@ public function get_logs($criteria, array $pagination=null) {

$params = array();
if(strlen($_crit)) {
$sql .= " WHERE l.details LIKE :search::text
OR cl.class_name LIKE :search2::text
OR ca.category_name LIKE :search3::text
OR ev.description LIKE :search4::text";
$sql .= " WHERE LOWER(l.details) LIKE :search::text
OR LOWER(cl.class_name) LIKE :search::text
OR LOWER(ca.category_name) LIKE :search::text
OR LOWER(ev.description) LIKE :search::text";
$params['search'] = "%". $_crit ."%";
$params['search2'] = "%". $_crit ."%";
$params['search3'] = "%". $_crit ."%";
$params['search4'] = "%". $_crit ."%";
}
$sql .= $_orderBy . $_limit .$_offset;
$this->_debug = $sql;

try {
$numrows = $this->db->run_query($sql, $params);
Expand Down
3 changes: 3 additions & 0 deletions tests/WebDBLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public function test_get_logs() {
'error' => array(
'seventh',
),
'another' => array(
'EigTh',
)
);

$totalRecords = 0;
Expand Down

0 comments on commit f8d41ec

Please sign in to comment.