From af9d056d19c40e6b4f4f54a56ae249eb5fa2560b Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 11 Nov 2023 20:31:41 -0500 Subject: [PATCH] set the ID of the control upon load if it exists --- app/lib/phast/Parser/ControlLoader.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/lib/phast/Parser/ControlLoader.inc.php b/app/lib/phast/Parser/ControlLoader.inc.php index bc2da10..56980f9 100644 --- a/app/lib/phast/Parser/ControlLoader.inc.php +++ b/app/lib/phast/Parser/ControlLoader.inc.php @@ -182,7 +182,7 @@ * @param MarkupElement $elem The MarkupElement to parse. * @param WebControl $parent The WebControl that owns this control. */ - public static function LoadControl($elem, $parent) + public static function LoadControl(MarkupElement $elem, $parent) { if (get_class($elem) == "UniversalEditor\\ObjectModels\\Markup\\MarkupTagElement") { @@ -204,6 +204,12 @@ if (class_exists($realname)) { $obj = new $realname(); + + $id = $elem->GetAttributeValue("id"); + if ($id !== null) + { + $obj->ID = $id; + } } else {