Skip to content

Commit 941db56

Browse files
refactor(imap): message handler to return mailbox
1 parent 8cd9b66 commit 941db56

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/imap/handler_modules.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,6 +1920,12 @@ public function process() {
19201920
$this->out('imap_accounts', $this->user_config->get('imap_servers'), array());
19211921
$this->out('show_pagination_links', $this->user_config->get('pagination_links_setting', true));
19221922
$this->out('auto_advance_email_enabled', $this->user_config->get('auto_advance_email_setting', true));
1923+
1924+
$parts = explode('_', 'imap_' . $form['imap_server_id'] . '_' . $form['folder'], 3);
1925+
$details = Hm_IMAP_List::dump($parts[1]);
1926+
$mailbox_name = $details['name'];
1927+
1928+
19231929
$part = false;
19241930
$prefetch = false;
19251931
if (isset($this->request->post['imap_msg_part']) && preg_match("/[0-9\.]+/", $this->request->post['imap_msg_part'])) {
@@ -1983,6 +1989,7 @@ public function process() {
19831989
$this->session->set(sprintf('reply_details_imap_%s_%s_%s', $form['imap_server_id'], $form['folder'], $form['imap_msg_uid']),
19841990
array('ts' => time(), 'msg_struct' => $msg_struct_current, 'msg_text' => ($save_reply_text ? $msg_text : ''), 'msg_headers' => $msg_headers));
19851991
}
1992+
$this->out('mailbox_name', $mailbox_name);
19861993
}
19871994
}
19881995
}

0 commit comments

Comments
 (0)