diff --git a/webui/config.php b/webui/config.php index 64333edb..e2e9f27d 100644 --- a/webui/config.php +++ b/webui/config.php @@ -163,6 +163,7 @@ define('TABLE_FOLDER_EXTRA', 'folder_extra'); define('TABLE_FOLDER_MESSAGE', 'folder_message'); define('TABLE_EMAIL', 'email'); define('TABLE_META', 'metadata'); +define('TABLE_RCPT', 'rcpt'); define('TABLE_ATTACHMENT', 'attachment'); define('TABLE_SEARCH', 'search'); define('TABLE_EMAIL_LIST', 'email_groups'); diff --git a/webui/model/search/search.php b/webui/model/search/search.php index acccb82c..4f9976d7 100644 --- a/webui/model/search/search.php +++ b/webui/model/search/search.php @@ -443,6 +443,7 @@ class ModelSearchSearch extends Model { private function get_meta_data($ids = array(), $q = '', $sortorder = '') { $messages = array(); + $rcpt = $srcpt = array(); $tag = array(); $note = array(); @@ -455,6 +456,21 @@ class ModelSearchSearch extends Model { if(isset($m['meta'])) { return unserialize($m['meta']); } } + $query = $this->db->query("SELECT `id`, `to` FROM `" . TABLE_RCPT . "` WHERE `id` IN ($q)", $ids); + + if(isset($query->rows)) { + foreach($query->rows as $r) { + if(!isset($rcpt[$r['id']])) { + $srcpt[$r['id']] = $r['to']; + $rcpt[$r['id']] .= $r['to']; + } + else { + $rcpt[$r['id']] .= ",\n" . $r['to']; + } + } + } + + $query = $this->db->query("SELECT `id`, `from`, `subject`, `piler_id`, `reference`, `size`, `spam`, `sent`, `arrived`, `attachments` FROM `" . TABLE_META . "` WHERE `id` IN ($q) $sortorder", $ids); if(isset($query->rows)) { @@ -478,6 +494,9 @@ class ModelSearchSearch extends Model { foreach($query->rows as $m) { $m['shortfrom'] = make_short_string($m['from'], MAX_CGI_FROM_SUBJ_LEN); + $m['shortto'] = $srcpt[$m['id']]; + $m['to'] = $rcpt[$m['id']]; + if($m['subject'] == "") { $m['subject'] = "<" . $lang->data['text_no_subject'] . ">"; } $m['subject'] = escape_gt_lt_quote_symbols($m['subject']); diff --git a/webui/view/theme/default/stylesheet/style-default.css b/webui/view/theme/default/stylesheet/style-default.css index 02738581..21879b0c 100644 --- a/webui/view/theme/default/stylesheet/style-default.css +++ b/webui/view/theme/default/stylesheet/style-default.css @@ -59,7 +59,7 @@ #resultscontainer { float: left; width: 990px; padding: 0; padding-bottom: 5px; height: auto; margin-top: 0px; margin-bottom: 0px; border-top: 3px solid black; border-bottom: 3px solid black; overflow:auto; } #resultscontainer.empty { border-bottom: 0px solid black; height: auto; overflow:auto; } - #results { float: left; width: 950px; margin-top: 0px; margin-bottom: 0px; border-collapse: collapse; display: table; clear: both; } + #results { float: left; width: 1120px; margin-top: 0px; margin-bottom: 0px; border-collapse: collapse; display: table; clear: both; } #auditresultscontainer { float: left; width: 990px; padding: 0; margin-top: 0px; margin-bottom: 0px; border-top: 3px solid black; border-bottom: 3px solid black; height: 580px; overflow: auto; } diff --git a/webui/view/theme/default/templates/search/helper.tpl b/webui/view/theme/default/templates/search/helper.tpl index 3749ea74..0f2b06d0 100644 --- a/webui/view/theme/default/templates/search/helper.tpl +++ b/webui/view/theme/default/templates/search/helper.tpl @@ -17,6 +17,9 @@ +