From 4d8164bb777e45f420fc50e6224f76a69a23bfd9 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 13 Jun 2019 10:14:08 -0600 Subject: [PATCH] Clear & reset content, modifications & readonlys when resetting the request. --- admin/inc/class.admin_cmd.inc.php | 1 + api/src/Etemplate.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/admin/inc/class.admin_cmd.inc.php b/admin/inc/class.admin_cmd.inc.php index f3d8a34707..c5c9f61db6 100644 --- a/admin/inc/class.admin_cmd.inc.php +++ b/admin/inc/class.admin_cmd.inc.php @@ -1346,6 +1346,7 @@ abstract class admin_cmd else { $tpl = Api\Etemplate::instance($name); + Api\Etemplate::reset_request(); } } return $tpl ? $tpl : null; diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index 84d4ff0b03..d0b9fb87a3 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -551,6 +551,9 @@ class Etemplate extends Etemplate\Widget\Template public static function reset_request() { self::$request = Etemplate\Request::read(); + self::$request->content = array(); + self::$request->modifications = array(); + self::$request->readonlys = array(); self::$cache = array(); } /**