major rewrite of the web interface

This commit is contained in:
SJ
2012-09-06 15:27:20 +02:00
parent e3bd0b987a
commit 853c4ab4f1
88 changed files with 1707 additions and 3839 deletions

View File

@ -20,11 +20,11 @@ class ControllerMessageDownload extends Controller {
$this->data['id'] = @$this->request->get['id'];
if(!verify_piler_id($this->data['id'])) {
AUDIT(ACTION_UNKNOWN, '', '', $this->data['id'], 'unknown piler id: ' . $this->data['id']);
AUDIT(ACTION_UNKNOWN, '', '', $this->data['id'], 'unknown id: ' . $this->data['id']);
die("invalid id: " . $this->data['id']);
}
if(!$this->model_search_search->check_your_permission_by_piler_id($this->data['id'])) {
if(!$this->model_search_search->check_your_permission_by_id($this->data['id'])) {
AUDIT(ACTION_UNAUTHORIZED_VIEW_MESSAGE, '', '', $this->data['id'], '');
die("no permission for " . $this->data['id']);
}
@ -32,13 +32,16 @@ class ControllerMessageDownload extends Controller {
AUDIT(ACTION_DOWNLOAD_MESSAGE, '', '', $this->data['id'], '');
$this->data['piler_id'] = $this->model_search_message->get_piler_id_by_id($this->data['id']);
header("Cache-Control: public, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . $this->data['id'] . ".eml");
header("Content-Disposition: attachment; filename=" . $this->data['piler_id'] . ".eml");
header("Content-Transfer-Encoding: binary\n");
print $this->model_search_message->get_raw_message($this->data['id']);
print $this->model_search_message->get_raw_message($this->data['piler_id']);
exit;
$this->render();