From 8215679b539750f0591b95aa1f277c572fddaeb3 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 6 Jun 2021 21:18:37 -0400 Subject: [PATCH] Remove unused clientside variable This variable `currentContactId` is pushed to the client side but never accessed. FYI if it were needed, core already makes it available as CRM.config.cid --- volunteer.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/volunteer.php b/volunteer.php index fec3a495..06023875 100644 --- a/volunteer.php +++ b/volunteer.php @@ -580,15 +580,7 @@ function volunteer_civicrm_angularModules(&$angularModules) { // Perhaps the placement of this code is a little hackish; unless/until we // extend Civi\Angular\Page\Main, there doesn't appear to be a better // alternative. This populates CRM.permissions on the client side. - CRM_Core_Resources::singleton()->addPermissions(array_keys(CRM_Volunteer_Permission::getVolunteerPermissions())) - - // Perhaps the placement of this code is a little hackish; unless/until we - // extend Civi\Angular\Page\Main, there doesn't appear to be a better - // alternative. This provides access to the current contact id on the - // client side. - ->addVars('org.civicrm.volunteer', array( - 'currentContactId' => CRM_Core_Session::singleton()->getLoggedInContactID() - )); + CRM_Core_Resources::singleton()->addPermissions(array_keys(CRM_Volunteer_Permission::getVolunteerPermissions())); } /**