|
@@ -133,6 +133,18 @@ if (strlen($filename) < 1) {
|
|
|
$filename = $filename . '.' . $suffix;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Update mailbox_cache and close session in order to prevent
|
|
|
+ * script locking on larger downloads. SendDownloadHeaders() and
|
|
|
+ * mime_print_body_lines() don't write information to session.
|
|
|
+ * mime_print_body_lines() call duration depends on size of
|
|
|
+ * attachment and script can cause interface lockups, if session
|
|
|
+ * is not closed.
|
|
|
+ */
|
|
|
+$mailbox_cache[$aMailbox['NAME']] = $aMailbox;
|
|
|
+sqsession_register($mailbox_cache,'mailbox_cache');
|
|
|
+session_write_close();
|
|
|
+
|
|
|
/*
|
|
|
* Note:
|
|
|
* The following sections display the attachment in different
|
|
@@ -156,7 +168,5 @@ if (isset($absolute_dl) && $absolute_dl) {
|
|
|
/* be aware that any warning caused by download.php will corrupt the
|
|
|
* attachment in case of ERROR reporting = E_ALL and the output is the screen */
|
|
|
mime_print_body_lines ($imapConnection, $passed_id, $ent_id, $encoding);
|
|
|
-$mailbox_cache[$aMailbox['NAME']] = $aMailbox;
|
|
|
-sqsession_register($mailbox_cache,'mailbox_cache');
|
|
|
|
|
|
?>
|