From dbb3e90ace89b256918a033794bcf9adae66e648 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Mon, 22 May 2023 21:50:15 -0600 Subject: [PATCH] Add smarty modifer in_array --- resources/classes/template.php | 1 + .../smarty/plugins/modifier.in_array.php | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 resources/templates/engine/smarty/plugins/modifier.in_array.php diff --git a/resources/classes/template.php b/resources/classes/template.php index afd92e1864..0c932163e3 100644 --- a/resources/classes/template.php +++ b/resources/classes/template.php @@ -44,6 +44,7 @@ $this->object->setTemplateDir($this->template_dir); $this->object->setCompileDir($this->cache_dir); $this->object->setCacheDir($this->cache_dir); + $this->object->registerPlugin("modifier","in_array", "in_array"); } if ($this->engine === 'raintpl') { require_once "resources/templates/engine/raintpl/rain.tpl.class.php"; diff --git a/resources/templates/engine/smarty/plugins/modifier.in_array.php b/resources/templates/engine/smarty/plugins/modifier.in_array.php new file mode 100644 index 0000000000..15d7565a04 --- /dev/null +++ b/resources/templates/engine/smarty/plugins/modifier.in_array.php @@ -0,0 +1,23 @@ +