From 8b5d16d30a48ea5b4afda7019dd09dbcd303194f Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 30 Apr 2014 08:30:34 -0400
Subject: [PATCH] Support 'error' and 'body_file' return attribs in 'message_before_send' hook (#1489595)

---
 program/lib/Roundcube/rcube.php |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index d58eb08..87103be 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -1438,6 +1438,13 @@
         ));
 
         if ($plugin['abort']) {
+            if (!empty($plugin['error'])) {
+                $error = $plugin['error'];
+            }
+            if (!empty($plugin['body_file'])) {
+                $body_file = $plugin['body_file'];
+            }
+
             return isset($plugin['result']) ? $plugin['result'] : false;
         }
 

--
Gitblit v1.9.1