folder handling changed

This commit is contained in:
Torsten Schulz
2023-07-14 23:27:26 +02:00
parent f9e7af7377
commit e2b71e8836
3 changed files with 4 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ class Emailinbox extends Renderer {
array_walk($headers, function(&$item, $key) {
$newItem = '<tr>';
$newItem .= '<td style="white-space:nowrap">' . ($item['date'] === false ? '' : $item['date']->format('d.m.Y H:i:s')) . '</td>';
$newItem .= '<td><a href="mail?folder=' . $this->folder . '&uid=' . $key . '">' . ($item['unread'] === 'U' ? '<b>' : '') . $item['title'] . ($item['unread'] === 'u' ? '</b>' : '') . '</td>';
$newItem .= '<td><a href="mail?folder=' . urlencode($this->folder) . '&uid=' . $key . '">' . ($item['unread'] === 'U' ? '<b>' : '') . $item['title'] . ($item['unread'] === 'u' ? '</b>' : '') . '</td>';
$newItem .= '<td>' . $item['from'] . '</td>';
$newItem .= '</tr>';
$item = $newItem;

View File

@@ -15,7 +15,7 @@ class Mail extends Mailhandling {
}
$params = $this->getUriParams();
$this->uid = $params['uid'];
$this->folder = $params['folder'];
$this->folder = url_decode($params['folder']);
$this->content['uid'] = $this->uid;
}

View File

@@ -12,9 +12,10 @@ class Mailhandling extends Renderer {
}
protected function fetchEmail(): PhpImap\IncomingMail {
$mailsIds = $this->mbox->searchMailbox('ALL');
$mailsIds = $this->mbox->searchMailbox($this->folder);
if (!in_array($this->uid, $mailsIds)) {
echo 'nicht auffindbar';
var_dump($this->folder, $this->uid);
die;
}
$mail = $this->mbox->getMail($this->uid);