From 61b688883d5b59de4d6dfc38c9ce9a0c0a98844d Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 17 Jan 2023 16:58:13 +1300 Subject: [PATCH] Add crmUrl function in the standard way Even during Smarty2 this method of registering functions was being phased out for putting the file in the folder --- CRM/Core/Smarty.php | 1 - CRM/Core/Smarty/plugins/function.crmURL.php | 45 +++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 CRM/Core/Smarty/plugins/function.crmURL.php diff --git a/CRM/Core/Smarty.php b/CRM/Core/Smarty.php index 41a7020575..8540aae7ac 100644 --- a/CRM/Core/Smarty.php +++ b/CRM/Core/Smarty.php @@ -131,7 +131,6 @@ class CRM_Core_Smarty extends Smarty { $this->assign('langSwitch', CRM_Core_I18n::uiLanguages()); } - $this->register_function('crmURL', ['CRM_Utils_System', 'crmURL']); if (CRM_Utils_Constant::value('CIVICRM_SMARTY_DEFAULT_ESCAPE')) { // When default escape is enabled if the core escape is called before // any custom escaping is done the modifier_escape function is not diff --git a/CRM/Core/Smarty/plugins/function.crmURL.php b/CRM/Core/Smarty/plugins/function.crmURL.php new file mode 100644 index 0000000000..540502d94a --- /dev/null +++ b/CRM/Core/Smarty/plugins/function.crmURL.php @@ -0,0 +1,45 @@ +