Merge branch 'hotfix-2.3.12'

pull/306/merge
iglocska 2014-10-24 14:18:48 +02:00
commit a7d8e17f77
2 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -18,8 +18,8 @@
/app/files/*
!/app/files/empty
!/app/files/scripts/
!/app/files/scripts/tmp/empty
/app/files/scripts/tmp/*
!/app/files/scripts/tmp/empty
/app/tmp/files/*
!/app/files/empty
/app/webroot/img/logo.png

View File

@ -181,10 +181,10 @@ class UsersController extends AppController {
$test = array();
foreach ($pieces as $piece) {
if ($piece[0] == '!') {
if ($searchTerm == 'email' || $searchTerm == 'org') $this->paginate['conditions']['AND'][] = array('LOWER(User.' . $searchTerm . ') NOT LIKE' => '%' . substr($piece, 1) . '%');
if ($searchTerm == 'email' || $searchTerm == 'org') $this->paginate['conditions']['AND'][] = array('LOWER(User.' . $searchTerm . ') NOT LIKE' => '%' . strtolower(substr($piece, 1)) . '%');
else $this->paginate['conditions']['AND'][] = array('User.' . $searchTerm => substr($piece, 1));
} else {
if ($searchTerm == 'email' || $searchTerm == 'org') $test['OR'][] = array('LOWER(User.' . $searchTerm . ') LIKE' => '%' . $piece . '%');
if ($searchTerm == 'email' || $searchTerm == 'org') $test['OR'][] = array('LOWER(User.' . $searchTerm . ') LIKE' => '%' . strtolower($piece) . '%');
else $test['OR'][] = array('User.' . $searchTerm => $piece);
}
}