From f87e456be27da2a46bdb3080f2132f9eac19ac0d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 10 Mar 2014 15:20:27 +0000 Subject: [PATCH] do not send/set extra data twice for multiple etemplate (eg. CRM view) --- etemplate/inc/class.etemplate.inc.php | 1 + phpgwapi/inc/class.egw_framework.inc.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index b745a675a6..813702ac6d 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -169,6 +169,7 @@ class etemplate_new extends etemplate_widget_template { //error_log("Ajax " . __LINE__); self::$response->generic('et2_load', $load_array+egw_framework::get_extra()); + egw_framework::clear_extra(); // to not send/set it twice for multiple etemplates (eg. CRM view) } else // first call { diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index 796f004c72..1e2da79f27 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -331,6 +331,14 @@ abstract class egw_framework self::$extra[$app.'-'.$name] = $value; } + /** + * Clear all extra data + */ + public static function clear_extra() + { + self::$extra = array(); + } + /** * Allow eg. ajax to query content set via refresh_opener or window_close *