From edc625b85fca36c9b8b7c9cff10d8423bcfbf743 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 5 May 2020 12:49:59 +0200 Subject: [PATCH] Add var_dump template function --- public_html/includes/class/class.LStemplate.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public_html/includes/class/class.LStemplate.php b/public_html/includes/class/class.LStemplate.php index e22768ed..ef921a85 100644 --- a/public_html/includes/class/class.LStemplate.php +++ b/public_html/includes/class/class.LStemplate.php @@ -128,6 +128,7 @@ class LStemplate { self :: registerFunction("img", "LStemplate_smarty_img"); self :: registerFunction("css", "LStemplate_smarty_css"); self :: registerFunction("uniqid", "LStemplate_smarty_uniqid"); + self :: registerFunction("var_dump", "LStemplate_smarty_var_dump"); // Define public root URL $public_root_url = LSconfig :: get('public_root_url', '/', 'string'); @@ -473,6 +474,10 @@ function LStemplate_smarty_uniqid($params, &$smarty) { $smarty -> assign($params['var'], uniqid()); } +function LStemplate_smarty_var_dump($params, &$smarty) { + var_dump($params['data']); +} + // Errors LSerror :: defineError('LStemplate_01', _("LStemplate : Template %{file} not found.")