Use auto-detect for IMAP folder hierarchy delimiter

Roundcube auto-detects the delimiter from the IMAP server via LIST
command. Remove hardcoded fallback values and let Roundcube handle
detection when no delimiter is explicitly configured.
This commit is contained in:
Laurent Dinclaux
2026-02-10 17:46:15 +11:00
parent 12572b563d
commit fc13088c62
2 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ class IdentSwitchForm
$prefix . 'tls' => ['type' => 'checkbox'], $prefix . 'tls' => ['type' => 'checkbox'],
$prefix . 'username' => ['type' => 'text', 'size' => 64, 'placeholder' => $record['email'] ?? ''], $prefix . 'username' => ['type' => 'text', 'size' => 64, 'placeholder' => $record['email'] ?? ''],
$prefix . 'password' => ['type' => 'password', 'size' => 64], $prefix . 'password' => ['type' => 'password', 'size' => 64],
$prefix . 'delimiter' => ['type' => 'text', 'size' => 1, 'placeholder' => '.'], $prefix . 'delimiter' => ['type' => 'text', 'size' => 1, 'placeholder' => 'Auto'],
]; ];
} }

View File

@@ -50,7 +50,7 @@ class IdentSwitchSwitcher
} }
} }
$_SESSION['imap_delimiter'] = $_SESSION['imap_delimiter' . ident_switch::MY_POSTFIX] ?? '.'; $_SESSION['imap_delimiter'] = $_SESSION['imap_delimiter' . ident_switch::MY_POSTFIX] ?? null;
$_SESSION['username'] = $rc->user->data['username']; $_SESSION['username'] = $rc->user->data['username'];
$_SESSION['password'] = $_SESSION['password' . ident_switch::MY_POSTFIX]; $_SESSION['password'] = $_SESSION['password' . ident_switch::MY_POSTFIX];
$_SESSION['iid' . ident_switch::MY_POSTFIX] = -1; $_SESSION['iid' . ident_switch::MY_POSTFIX] = -1;
@@ -107,7 +107,7 @@ class IdentSwitchSwitcher
$host = "{$ssl}://" . $host; $host = "{$ssl}://" . $host;
} }
$delimiter = $r['imap_delimiter'] ?: '.'; $delimiter = $r['imap_delimiter'] ?: null;
$_SESSION['storage_host'] = $host; $_SESSION['storage_host'] = $host;
$_SESSION['storage_ssl'] = $ssl; $_SESSION['storage_ssl'] = $ssl;