aboutsummaryrefslogtreecommitdiffhomepage
path: root/misc/render_template.php
diff options
context:
space:
mode:
authorwinter2024-12-31 22:30:16 +0000
committerwinter2024-12-31 22:31:26 +0000
commit4cd7017da9a37e5b9f38c3f50dd1c904ea41cbcb (patch)
treed77f1fd223dae44f40b22c9810aeba238733310d /misc/render_template.php
parent982e6213622bcb78a40d17f54cda27225a1d84b3 (diff)
implement user accounts and login
Diffstat (limited to 'misc/render_template.php')
-rw-r--r--misc/render_template.php3
1 files changed, 3 insertions, 0 deletions
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'];
}
}