From 4cd7017da9a37e5b9f38c3f50dd1c904ea41cbcb Mon Sep 17 00:00:00 2001 From: winter Date: Tue, 31 Dec 2024 22:30:16 +0000 Subject: implement user accounts and login --- misc/render_template.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'misc/render_template.php') diff --git a/misc/render_template.php b/misc/render_template.php index 1ee349d..294fc16 100644 --- a/misc/render_template.php +++ b/misc/render_template.php @@ -35,8 +35,11 @@ function render_template(string $templateName, array $args = []) { } function call_template(string $templateName, array $args = [], callable $slotContent = null) { global $__spooky_magical_template_global_state; + // note to self: yes this does actually clone the array + $__spooky_magical_template_global_state['previousState'] = $__spooky_magical_template_global_state; $__spooky_magical_template_global_state['slotContent'] = $slotContent; render_template($templateName, $args); + $__spooky_magical_template_global_state = $__spooky_magical_template_global_state['previousState']; } } -- cgit v1.3