mirror of https://github.com/MISP/MISP
Fix to the capitalisation in the user index filter and fix to the scripts tmp folder not being created on git clone
parent
1c3bb7d3ea
commit
d0b441132b
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue