Skip to content

Commit

Permalink
ews: fix reported errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kroky committed Nov 29, 2024
1 parent f250f56 commit c6a8205
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion modules/core/hm-mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,11 @@ public function dump_cache($type = 'string') {
}

public function get_state() {
return $this->connection->get_state();
if ($this->is_imap()) {
return $this->connection->get_state();
} else {
return $this->authed() ? 'authenticated' : 'disconnected';
}
}

public function get_capability() {
Expand Down
2 changes: 1 addition & 1 deletion modules/imap/output_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ class Hm_Output_display_imap_status extends Hm_Output_Module {
protected function output() {
$res = '';
foreach ($this->get('imap_servers', array()) as $index => $vals) {
$res .= '<tr><td>IMAP</td><td>'.$vals['name'].'</td><td class="imap_status_'.$vals['id'].'"></td>'.
$res .= '<tr><td>'.(strtoupper($vals['type'] ?? 'IMAP')).'</td><td>'.$vals['name'].'</td><td class="imap_status_'.$vals['id'].'"></td>'.
'<td class="imap_detail_'.$vals['id'].'"></td></tr>';
}
return $res;
Expand Down

0 comments on commit c6a8205

Please sign in to comment.