Fix to the capitalisation in the user index filter and fix to the scripts tmp folder not being created on git clone

pull/306/merge
iglocska 2014-10-24 14:17:58 +02:00
parent 1c3bb7d3ea
commit d0b441132b
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);
}
}