From: Tim Otten Date: Mon, 11 Nov 2013 22:49:37 +0000 (-0800) Subject: Smarty - Export $crmPermissions object for use in all templates X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=abbf7b482f28fa5e61e81199f45f07510d9b3d4a;p=civicrm-core.git Smarty - Export $crmPermissions object for use in all templates --- diff --git a/CRM/Core/Smarty.php b/CRM/Core/Smarty.php index 6422ca2c48..c88b450ee9 100644 --- a/CRM/Core/Smarty.php +++ b/CRM/Core/Smarty.php @@ -160,6 +160,8 @@ class CRM_Core_Smarty extends Smarty { $this->register_function('crmURL', array('CRM_Utils_System', 'crmURL')); $this->load_filter('pre', 'resetExtScope'); + + $this->assign('crmPermissions', new CRM_Core_Smarty_Permissions()); } /** diff --git a/CRM/Core/Smarty/Permissions.php b/CRM/Core/Smarty/Permissions.php new file mode 100644 index 0000000000..377c10898a --- /dev/null +++ b/CRM/Core/Smarty/Permissions.php @@ -0,0 +1,9 @@ +