diff --git a/modules/imap/functions.php b/modules/imap/functions.php
index 2b5904baf7..02ee8b9053 100644
--- a/modules/imap/functions.php
+++ b/modules/imap/functions.php
@@ -114,8 +114,7 @@ function prepare_imap_message_list($msgs, $mod, $type) {
function format_imap_folder_section($folders, $id, $output_mod, $with_input = false) {
$results = '
';
$manage = $output_mod->get('imap_folder_manage_link');
- $quota = $output_mod->get('quota');
- $quota_max = $output_mod->get('quota_max');
+
foreach ($folders as $folder_name => $folder) {
$folder_name = bin2hex($folder_name);
$results .= '- ';
@@ -156,9 +155,7 @@ function format_imap_folder_section($folders, $id, $output_mod, $with_input = fa
if ($manage) {
$results .= '
- '.$output_mod->trans('Manage Folders').'
';
}
- if ($quota) {
- $results .= '- '.$quota.'% used on '.$quota_max.' MB
';
- }
+
$results .= '
';
return $results;
}}
@@ -883,7 +880,7 @@ function imap_move_same_server($ids, $action, $hm_cache, $dest_path, $screen_ema
}
}
}
-
+
}
}
return $moved;
diff --git a/modules/imap/handler_modules.php b/modules/imap/handler_modules.php
index 9008f4e99a..da588c91e0 100644
--- a/modules/imap/handler_modules.php
+++ b/modules/imap/handler_modules.php
@@ -774,6 +774,7 @@ public function process() {
$this->out('imap_expanded_folder_id', $form['imap_server_id']);
$this->out('imap_expanded_folder_path', $path);
$this->out('with_input', $with_subscription);
+ $this->out('folder', $folder);
return;
}
if (imap_authed($imap)) {
@@ -790,6 +791,7 @@ public function process() {
$this->out('imap_expanded_folder_id', $form['imap_server_id']);
$this->out('imap_expanded_folder_path', $path);
$this->out('with_input', $with_subscription);
+ $this->out('folder', $folder);
}
else {
Hm_Msgs::add(sprintf('ERRCould not authenticate to the selected %s server (%s)', $imap->server_type, $this->user_config->get('imap_servers')[$form['imap_server_id']]['user']));
@@ -1926,7 +1928,7 @@ class Hm_Handler_imap_message_content extends Hm_Handler_Module {
*/
public function process() {
list($success, $form) = $this->process_form(array('imap_server_id', 'imap_msg_uid', 'folder'));
-
+
if ($success) {
$this->out('msg_text_uid', $form['imap_msg_uid']);
$this->out('msg_server_id', $form['imap_server_id']);
diff --git a/modules/imap/output_modules.php b/modules/imap/output_modules.php
index c1190f2481..957fa70619 100644
--- a/modules/imap/output_modules.php
+++ b/modules/imap/output_modules.php
@@ -87,7 +87,7 @@ protected function output() {
$path = sprintf('?page=message_list&list_path=%s&screen_emails=1', $this->html_safe($this->get('list_path')));
$custom .= '';
- }
+ }
}
$this->out('custom_list_controls', $custom);
}
@@ -776,8 +776,14 @@ protected function output() {
$res = '';
$folder_data = $this->get('imap_expanded_folder_data', array());
$with_input = $this->get('with_input', false);
+ $folder = $this->get('folder', '');
if (!empty($folder_data)) {
$res .= format_imap_folder_section($folder_data, $this->get('imap_expanded_folder_id'), $this, $with_input);
+ $quota = $this->get('quota');
+ $quota_max = $this->get('quota_max');
+ if (!$folder && $quota) {
+ $res .= ''.$quota.'% used on '.$quota_max.' MB';
+ }
$this->out('imap_expanded_folder_formatted', $res);
}
}