public function listMailboxes()
{
$imptree = $GLOBALS['injector']->getInstance('IMP_Imap_Tree');
+
+ /* This might be a long running operation. */
+ if ($vars->initial) {
+ session_write_close();
+ }
+
$initreload = ($this->_vars->initial || $this->_vars->reload);
$result = new stdClass;
$result->quota = $quota;
}
+ if ($vars->initial) {
+ session_start();
+ }
+
return $result;
}
} elseif ($changed ||
$this->_vars->rangeslice ||
!$this->_vars->checkcache) {
+ /* Ticket #7422: Listing messages may be a long-running operation,
+ * so close the session while we are doing it to prevent
+ * deadlocks. */
+ session_write_close();
+
$result = new stdClass;
$result->ViewPort = $this->_viewPortData($changed);
+
+ /* Reopen the session. */
+ session_start();
} else {
$result = false;
}
*/
protected function _viewPortData($change)
{
- // Ticket #7422: Listing messages may be a long-running operation,
- // so close the session while we are doing it to prevent deadlocks.
- session_write_close();
-
$args = array(
'applyfilter' => $this->_vars->applyfilter,
'cache' => $this->_vars->cache,
}
$list_msg = new IMP_Views_ListMessages();
- $msgs = $list_msg->listMessages($args);
-
- // Reopen the session.
- session_start();
-
- return $msgs;
+ return $list_msg->listMessages($args);
}
/**