From 4f61bc073da65c793dfeb5059bf988dd7b3e79fa Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 27 Jul 2017 13:28:37 -0600 Subject: [PATCH] Fix calendar entries opened from mail using a link could not be edited --- api/src/Etemplate.php | 11 +++++++++++ calendar/inc/class.calendar_ui.inc.php | 1 + 2 files changed, 12 insertions(+) diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index cd2d8be730..77c0a27212 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -506,6 +506,17 @@ class Etemplate extends Etemplate\Widget\Template { $this->dom_id = $new_id; } + + /** + * Make sure there's a new request, in case of multiple Etemplates in one call. + * Normally this isn't a problem, but if you've got an etemplate in the sidebox, + * and are seeing problems submitting another etemplate, try this before executing + * the sidebox etemplate. + */ + public static function reset_request() + { + self::$request = Etemplate\Request::read(); + } /** * Get template data as array * diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 1db1738a00..667a456166 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -553,6 +553,7 @@ class calendar_ui $this->merge(); return; } + Etemplate::reset_request(); $sidebox = new Etemplate('calendar.sidebox'); $cont = $this->cal_prefs['saved_states'];