mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-22 07:13:17 +02:00
@ -93,7 +93,7 @@ class ControllerSearchHelper extends Controller {
|
||||
private function fixup_post_simple_request() {
|
||||
$match = '';
|
||||
|
||||
if(isset($this->request->post['from']) && $this->request->post['from']) { $match .= "@from " . $this->request->post['from'] . ' '; }
|
||||
if(isset($this->request->post['from']) && $this->request->post['from']) { $match .= FROM_TOKEN . ' ' . $this->request->post['from'] . ' '; }
|
||||
if(isset($this->request->post['to']) && $this->request->post['to']) { $match .= "@to " . $this->request->post['to'] . ' '; }
|
||||
if(isset($this->request->post['subject']) && $this->request->post['subject']) { $match .= "@subject " . $this->request->post['subject'] . ' '; }
|
||||
if(isset($this->request->post['body']) && $this->request->post['body']) { $match .= "@body " . $this->request->post['body'] . ' '; }
|
||||
@ -144,7 +144,7 @@ class ControllerSearchHelper extends Controller {
|
||||
}
|
||||
else if(strchr($v, '@')) {
|
||||
$prev_token_is_email = 1;
|
||||
if($from == '') { $from = "@from"; }
|
||||
if($from == '') { $from = FROM_TOKEN; }
|
||||
$from .= " $v";
|
||||
}
|
||||
else {
|
||||
|
@ -96,8 +96,7 @@ class ModelSearchSearch extends Model {
|
||||
$id = "";
|
||||
$offset = 0;
|
||||
$total_sphx_hits = $num_rows = 0;
|
||||
$fields = array("@(subject,body)", "@from", "@to", "@subject", "@body", "@attachment_types");
|
||||
|
||||
$fields = array("@(subject,body)", FROM_TOKEN, "@to", "@subject", "@body", "@attachment_types");
|
||||
|
||||
$pagelen = get_page_length();
|
||||
$offset = $page * $pagelen;
|
||||
@ -128,7 +127,7 @@ class ModelSearchSearch extends Model {
|
||||
|
||||
if(substr($v, 0, 1) == "@") {
|
||||
$v = substr($v, 1, strlen($v)-1);
|
||||
if($data['match'][$i-1] == "@from") { $data['match'][$i-1] = "@fromdomain"; }
|
||||
if($data['match'][$i-1] == FROM_TOKEN) { $data['match'][$i-1] = "@fromdomain"; }
|
||||
if($data['match'][$i-1] == "@to") { $data['match'][$i-1] = "@todomain"; }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user