mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 08:00:12 +01:00
search query quote support
This commit is contained in:
parent
668630fb53
commit
cdd78a5ad8
@ -47,6 +47,8 @@ $config['DEMO_MODE'] = 0;
|
|||||||
|
|
||||||
$config['SHOW_MENU_FOR_OUTLOOK'] = 0;
|
$config['SHOW_MENU_FOR_OUTLOOK'] = 0;
|
||||||
|
|
||||||
|
$config['SEARCH_QUERY_QUOTING'] = 0;
|
||||||
|
|
||||||
$config['TIMEZONE'] = 'Europe/Budapest';
|
$config['TIMEZONE'] = 'Europe/Budapest';
|
||||||
|
|
||||||
$config['PROVIDED_BY'] = 'www.mailpiler.org';
|
$config['PROVIDED_BY'] = 'www.mailpiler.org';
|
||||||
@ -164,7 +166,7 @@ $config['MAX_SEARCH_HITS'] = 1000;
|
|||||||
$config['DEFAULT_RETENTION'] = 0;
|
$config['DEFAULT_RETENTION'] = 0;
|
||||||
|
|
||||||
$config['LOCALHOST'] = '127.0.0.1';
|
$config['LOCALHOST'] = '127.0.0.1';
|
||||||
$config['PILER_HOST'] = '1.2.3.4';
|
$config['PILER_HOST'] = '127.0.0.1';
|
||||||
$config['PILER_PORT'] = 25;
|
$config['PILER_PORT'] = 25;
|
||||||
$config['SMARTHOST'] = '127.0.0.1';
|
$config['SMARTHOST'] = '127.0.0.1';
|
||||||
$config['SMARTHOST_PORT'] = 10026;
|
$config['SMARTHOST_PORT'] = 10026;
|
||||||
|
@ -166,6 +166,24 @@ class ModelSearchSearch extends Model {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(SEARCH_QUERY_QUOTING == 1) {
|
||||||
|
$quoting = 0;
|
||||||
|
|
||||||
|
for($i=2; $i<count($data['match']); $i++) {
|
||||||
|
if(preg_match("/^\"/", $data['match'][$i])) {
|
||||||
|
$quoting = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($quoting == 0) {
|
||||||
|
$data['match'][$i] = '"' . $data['match'][$i] . '"';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(preg_match("/\"$/", $data['match'][$i])) {
|
||||||
|
$quoting = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$match = implode(" ", $data['match']);
|
$match = implode(" ", $data['match']);
|
||||||
|
|
||||||
if($emailfilter) {
|
if($emailfilter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user