From a7105a4f0c7b6ae6c214564a0983a38aa7eca052 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 3 Nov 2014 17:08:52 +0100 Subject: [PATCH] Don't destroy session on ics feed download (#3427) --- plugins/calendar/calendar.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index a687e4d2..13661418 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -1495,6 +1495,8 @@ class calendar extends rcube_plugin */ function ical_feed_export() { + $session_exists = !empty($_SESSION['user_id']); + // process HTTP auth info if (!empty($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { $_POST['_user'] = $_SERVER['PHP_AUTH_USER']; // used for rcmail::autoselect_host() @@ -1539,7 +1541,8 @@ class calendar extends rcube_plugin } // don't save session data - session_destroy(); + if (!$session_exists) + session_destroy(); exit; }