From 1172330b2abb6fe287e88e98e9c3dbd9d76ee785 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 31 Jul 2015 12:48:52 -0400
Subject: [PATCH] Fix error when using back button after sending an email (#1490009)

---
 program/steps/utils/error.inc |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/program/steps/utils/error.inc b/program/steps/utils/error.inc
index 16fbb03..16ff118 100644
--- a/program/steps/utils/error.inc
+++ b/program/steps/utils/error.inc
@@ -72,6 +72,15 @@
     $__error_text .= '<p><i>' . $rcmail->gettext('errfailedrequest') . ":</i><br />\n<tt>//$request_url</tt></p>";
 }
 
+// invalid compose ID
+else if ($ERROR_CODE == 450 && $_SERVER['REQUEST_METHOD'] == 'GET' && $rcmail->action == 'compose') {
+    $url = $rcmail->url('compose');
+
+    $__error_title = strtoupper($rcmail->gettext('errcomposesession'));
+    $__error_text  = nl2br($rcmail->gettext('errcomposesessionexplain'))
+        . '<p>' . html::a($url, $rcmail->gettext('clicktocompose')) . '</p>';
+}
+
 // database connection error
 else if ($ERROR_CODE == 601) {
     $__error_title = "CONFIGURATION ERROR";

--
Gitblit v1.9.1