added detach support for the gui

This commit is contained in:
SJ
2013-04-09 15:02:10 +02:00
parent 2a94804586
commit 8cf4a1b759
10 changed files with 149 additions and 16 deletions

View File

@ -51,6 +51,8 @@ class ControllerMessageBulkrestore extends Controller {
}
$this->model_search_message->connect_to_pilergetd();
foreach($idlist as $id) {
AUDIT(ACTION_RESTORE_MESSAGE, '', '', $id, '');
@ -88,6 +90,7 @@ class ControllerMessageBulkrestore extends Controller {
}
}
$this->model_search_message->disconnect_from_pilergetd();
if(ENABLE_IMAP_AUTH == 1) { $this->model_mail_mail->disconnect_imap(); }

View File

@ -40,8 +40,10 @@ class ControllerMessageDownload extends Controller {
header("Content-Disposition: attachment; filename=" . $this->data['piler_id'] . ".eml");
header("Content-Transfer-Encoding: binary\n");
$this->model_search_message->connect_to_pilergetd();
$msg = $this->model_search_message->get_raw_message($this->data['piler_id']);
$this->model_search_message->disconnect_from_pilergetd();
$this->model_search_message->remove_journal($msg);
print $msg;
}

View File

@ -64,7 +64,10 @@ class ControllerMessageRestore extends Controller {
$this->data['piler_id'] = $this->model_search_message->get_piler_id_by_id($this->data['id']);
$this->model_search_message->connect_to_pilergetd();
$msg = $this->model_search_message->get_raw_message($this->data['piler_id']);
$this->model_search_message->disconnect_from_pilergetd();
$this->model_search_message->remove_journal($msg);
if(ENABLE_IMAP_AUTH == 1) {