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

@ -13,15 +13,20 @@ class ModelMessageRestore extends Model {
if($zip->open($filename, ZIPARCHIVE::CREATE) != true) { exit("cannot open <$filename>\n"); }
$this->model_search_message->connect_to_pilergetd();
foreach($idlist as $id) {
$piler_id = $this->model_search_message->get_piler_id_by_id($id);
$rawemail = $this->model_search_message->get_raw_message($piler_id);
$zip->addFromString($piler_id . ".eml", $rawemail);
AUDIT(ACTION_DOWNLOAD_MESSAGE, '', '', $id, '');
}
$this->model_search_message->disconnect_from_pilergetd();
$zip->close();