diff --git a/language/az.php b/language/az.php index 32f301faac..a1415a8ecf 100755 --- a/language/az.php +++ b/language/az.php @@ -633,4 +633,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/de.php b/language/de.php index 14c58479ed..af3fa782fc 100755 --- a/language/de.php +++ b/language/de.php @@ -630,4 +630,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/en.php b/language/en.php index b83de4088a..ef42888b8f 100755 --- a/language/en.php +++ b/language/en.php @@ -648,4 +648,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/es.php b/language/es.php index 93ec8b461b..5aa565a855 100755 --- a/language/es.php +++ b/language/es.php @@ -630,4 +630,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/et.php b/language/et.php index c2aa150286..3b9030ec2e 100755 --- a/language/et.php +++ b/language/et.php @@ -638,4 +638,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/fa.php b/language/fa.php index 646534a0e5..638d8ff593 100755 --- a/language/fa.php +++ b/language/fa.php @@ -682,4 +682,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/fr.php b/language/fr.php index eb2b4ef1ce..2d428b79d5 100755 --- a/language/fr.php +++ b/language/fr.php @@ -629,4 +629,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/hu.php b/language/hu.php index f40693dffd..cb6049dbe1 100755 --- a/language/hu.php +++ b/language/hu.php @@ -630,4 +630,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/id.php b/language/id.php index aede9ea659..dfd2ec6b00 100755 --- a/language/id.php +++ b/language/id.php @@ -637,4 +637,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/it.php b/language/it.php index 1b9838a940..d18a962ca9 100755 --- a/language/it.php +++ b/language/it.php @@ -630,4 +630,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/ja.php b/language/ja.php index f6e25fdb9d..2be5431efb 100755 --- a/language/ja.php +++ b/language/ja.php @@ -630,4 +630,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/nl.php b/language/nl.php index 3d4c863401..618860defe 100755 --- a/language/nl.php +++ b/language/nl.php @@ -630,4 +630,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/pt-BR.php b/language/pt-BR.php index 2e7409fe9a..e9bccf01b6 100755 --- a/language/pt-BR.php +++ b/language/pt-BR.php @@ -629,4 +629,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/ro.php b/language/ro.php index d942fb3541..d7263cd337 100755 --- a/language/ro.php +++ b/language/ro.php @@ -629,4 +629,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/ru.php b/language/ru.php index b445a3b95f..d2a3bc4c07 100755 --- a/language/ru.php +++ b/language/ru.php @@ -631,4 +631,6 @@ 'Trash' => false, 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/language/zh-Hans.php b/language/zh-Hans.php index 4109dfee72..153d7d1669 100644 --- a/language/zh-Hans.php +++ b/language/zh-Hans.php @@ -651,4 +651,6 @@ 'Trash' => '已删除', 'Pasted text has leading or trailing spaces' => false, 'No tags available yet.' => false, + 'Server capabilities' => false, + 'Capabilities' => false, ); diff --git a/modules/developer/modules.php b/modules/developer/modules.php index 2f13c2f0b4..a2bcd23ae0 100644 --- a/modules/developer/modules.php +++ b/modules/developer/modules.php @@ -277,3 +277,31 @@ protected function output() { return ''; } } + +/** + * Starts a capabilities table used on the info page + * @subpackage developer/output + */ +class Hm_Output_server_capabilities_start extends Hm_Output_Module { + /** + * Modules populate this table to run a status check from the info page + */ + protected function output() { + $res = '
'.$this->trans('Capabilities').'
'; + return $res; + } +} + +/** + * Close the capabilities table used on the info page + * @subpackage developer/output + */ +class Hm_Output_server_capabilities_end extends Hm_Output_Module { + /** + * Close the table opened in Hm_Output_server_capabilities_start + */ + protected function output() { + return '
'.$this->trans('Type').''.$this->trans('Name').''. + $this->trans('Server capabilities').'
'; + } +} diff --git a/modules/developer/setup.php b/modules/developer/setup.php index 6078ff5506..79a12d650b 100644 --- a/modules/developer/setup.php +++ b/modules/developer/setup.php @@ -16,7 +16,9 @@ add_output('info', 'server_information', true, 'developer', 'info_heading', 'after'); add_output('info', 'server_status_start', true, 'developer', 'server_information', 'after'); add_output('info', 'server_status_end', true, 'developer', 'server_status_start', 'after'); - add_output('info', 'config_map', true, 'developer', 'server_status_end', 'after'); + add_output('info', 'server_capabilities_start', true, 'developer', 'server_status_end', 'after'); + add_output('info', 'server_capabilities_end', true, 'developer', 'server_capabilities_start', 'after'); + add_output('info', 'config_map', true, 'developer', 'server_capabilities_end', 'after'); /* folder list */ add_output('ajax_hm_folders', 'info_page_link', true, 'developer', 'settings_menu_end', 'before'); diff --git a/modules/imap/handler_modules.php b/modules/imap/handler_modules.php index 43975a6c8f..4cf5210bcf 100644 --- a/modules/imap/handler_modules.php +++ b/modules/imap/handler_modules.php @@ -1327,10 +1327,12 @@ public function process() { $imap = Hm_IMAP_List::connect($id, $cache); $this->out('imap_connect_time', microtime(true) - $start_time); if (imap_authed($imap)) { + $this->out('imap_capabilities_list', $imap->get_capability()); $this->out('imap_connect_status', $imap->get_state()); $this->out('imap_status_server_id', $id); } else { + $this->out('imap_capabilities_list', ""); $this->out('imap_connect_status', 'disconnected'); $this->out('imap_status_server_id', $id); } diff --git a/modules/imap/output_modules.php b/modules/imap/output_modules.php index daf09cf164..d83c91ee17 100644 --- a/modules/imap/output_modules.php +++ b/modules/imap/output_modules.php @@ -719,6 +719,24 @@ protected function output() { } } +/** + * Format the IMAP status output on the info page + * @subpackage imap/output + */ +class Hm_Output_display_imap_capability extends Hm_Output_Module { + /** + * Build the HTML for the status rows. Will be populated by an ajax call per server + */ + protected function output() { + $res = ''; + foreach ($this->get('imap_servers', array()) as $index => $vals) { + $res .= 'IMAP'.$vals['name'].''. + ''; + } + return $res; + } +} + /** * Output a hidden field with all the IMAP server ids * @subpackage imap/output @@ -796,6 +814,12 @@ protected function output() { $res .= ''.implode(', ', $capabilities).''; } $this->out('sieve_detail_display', $res); + $res = ''; + $extensions = $this->get('imap_capabilities_list', ""); + if ($extensions) { + $res .= ''.$extensions.''; + } + $this->out('imap_extensions_display', $res); } } diff --git a/modules/imap/setup.php b/modules/imap/setup.php index fbdf8ff5c0..4de2800c29 100644 --- a/modules/imap/setup.php +++ b/modules/imap/setup.php @@ -15,6 +15,7 @@ /* add stuff to the info page */ add_output('info', 'display_imap_status', true, 'imap', 'server_status_start', 'after'); +add_output('info', 'display_imap_capability', true, 'imap', 'server_capabilities_start', 'after'); add_output('info', 'imap_server_ids', true, 'imap', 'page_js', 'before'); /* servers page data */ @@ -345,6 +346,7 @@ 'allowed_output' => array( 'imap_connect_status' => array(FILTER_DEFAULT, false), + 'imap_capabilities_list' => array(FILTER_DEFAULT, false), 'connect_status' => array(FILTER_DEFAULT, false), 'auto_sent_folder' => array(FILTER_DEFAULT, false), 'imap_connect_time' => array(FILTER_DEFAULT, false), diff --git a/modules/imap/site.css b/modules/imap/site.css index 36696f622d..cbfc169646 100644 --- a/modules/imap/site.css +++ b/modules/imap/site.css @@ -255,7 +255,7 @@ .online { color: var(--bs-primary); } -.sieve_extensions { +.sieve_extensions,.imap_extensions { font-size: 75%; white-space: normal; } diff --git a/modules/imap/site.js b/modules/imap/site.js index a3e6feb4ac..7f62d94a55 100644 --- a/modules/imap/site.js +++ b/modules/imap/site.js @@ -273,6 +273,7 @@ var imap_status_update = function() { var id = res.imap_status_server_id; $('.imap_status_'+id).html(res.imap_status_display); $('.imap_detail_'+id).html(res.sieve_detail_display); + $('.imap_capabilities_'+id).html(res.imap_extensions_display); }; for (i=0;i array(FILTER_UNSAFE_RAW, false), 'mailboxes' => array(FILTER_UNSAFE_RAW, false), 'sieve_detail_display' => array(FILTER_UNSAFE_RAW, false), + 'imap_extensions_display' => array(FILTER_UNSAFE_RAW, false), 'script_details' => array(FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY), ), 'allowed_get' => array(),