From 05dd257c5d512e5e755963d21a4a58f9e5abf6dd Mon Sep 17 00:00:00 2001 From: alec Date: Tue, 7 Jul 2009 17:49:52 +0000 Subject: - 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 --- roundcubemail/program/steps/mail/show.inc | 10 +++++++--- roundcubemail/skins/default/templates/messageerror.html | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 roundcubemail/skins/default/templates/messageerror.html 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; diff --git a/roundcubemail/skins/default/templates/messageerror.html b/roundcubemail/skins/default/templates/messageerror.html new file mode 100644 index 000000000..d180e7435 --- /dev/null +++ b/roundcubemail/skins/default/templates/messageerror.html @@ -0,0 +1,14 @@ + + + + + + + + +
+ +
+ + + -- cgit v1.2.3