summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-07 17:49:52 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-07 17:49:52 +0000
commit05dd257c5d512e5e755963d21a4a58f9e5abf6dd (patch)
tree90b56e5f69271f6acf3c1445672b45d4e234e44b /roundcubemail/program
parentbd574bcf3ca5bd8872d972bf80d47fe762c44052 (diff)
- if message wasn't found in preview mode display separate template
git-svn-id: https://svn.roundcube.net/trunk@2723 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/mail/show.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/show.inc b/roundcubemail/program/steps/mail/show.inc
index 2395ac604..423b9332c 100644
--- a/roundcubemail/program/steps/mail/show.inc
+++ b/roundcubemail/program/steps/mail/show.inc
@@ -29,11 +29,15 @@ if ($_GET['_uid']) {
if (!empty($MESSAGE->headers->charset))
$IMAP->set_charset($MESSAGE->headers->charset);
- // go back to list if message not found (wrong UID)
+ // if message not found (wrong UID)...
if (empty($MESSAGE->headers)) {
$OUTPUT->show_message('messageopenerror', 'error');
- if ($RCMAIL->action=='preview' && $OUTPUT->template_exists('messagepreview'))
- $OUTPUT->send('messagepreview');
+ // ... display error or preview page
+ if ($RCMAIL->action=='preview' && $OUTPUT->template_exists('messageerror'))
+ $OUTPUT->send('messageerror');
+ else if ($RCMAIL->action=='preview' && $OUTPUT->template_exists('messagepreview'))
+ $OUTPUT->send('messagepreview');
+ // ... go back to the list
else {
rcmail_overwrite_action('');
return;