Skip to content

Commit

Permalink
fix proper way of reading config file
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed Sep 2, 2014
1 parent 91f7f1f commit dce5d9c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/yajra/Datatables/Datatables.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,7 @@ private function doFiltering()
}

$keyword = '%'.$input->get('sSearch').'%';

if(Config::get('datatables.search.use_wildcards', false)) {
if(Config::get('datatables::search.use_wildcards')) {
$keyword = $copy_this->wildcardLikeString($input->get('sSearch'));
}

Expand All @@ -464,7 +463,7 @@ private function doFiltering()
}

$column = $db_prefix . $column;
if(Config::get('datatables.search.case_insensitive', false)) {
if(Config::get('datatables::search.case_insensitive', false)) {
$query->orwhere($connection->raw('LOWER('.$cast_begin.$column.$cast_end.')'), 'LIKE', strtolower($keyword));
} else {
$query->orwhere($connection->raw($cast_begin.$column.$cast_end), 'LIKE', $keyword);
Expand All @@ -481,11 +480,11 @@ private function doFiltering()
{
$keyword = '%'.$this->input->get('sSearch_'.$i).'%';

if(Config::get('datatables.search.use_wildcards', false)) {
if(Config::get('datatables::search.use_wildcards', false)) {
$keyword = $copy_this->wildcardLikeString($this->input->get('sSearch_'.$i));
}

if(Config::get('datatables.search.case_insensitive', false)) {
if(Config::get('datatables::search.case_insensitive', false)) {
$column = $db_prefix . $columns[$i];
$this->query->where($this->connection->raw('LOWER('.$column.')'),'LIKE', strtolower($keyword));
} else {
Expand Down

0 comments on commit dce5d9c

Please sign in to comment.