From: Tim Otten Date: Thu, 7 Mar 2013 08:19:06 +0000 (-0500) Subject: CRM-11925 - Remove DrupalBase::getAllModulePermissions() because: X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c0d37c80e9c3af3c14ace3a8afd993bc0997d38b;p=civicrm-core.git CRM-11925 - Remove DrupalBase::getAllModulePermissions() because: 1. We only need to support hook_permissions for Civi ext-modules, so we don't need a special way to invoke that hook in Drupal. 2. The parent class implements the function in a simpler/more portable way. --- diff --git a/CRM/Core/Permission/DrupalBase.php b/CRM/Core/Permission/DrupalBase.php index f4fd169ea0..053cac9316 100644 --- a/CRM/Core/Permission/DrupalBase.php +++ b/CRM/Core/Permission/DrupalBase.php @@ -244,21 +244,4 @@ class CRM_Core_Permission_DrupalBase extends CRM_Core_Permission_Base { return implode(', ', $emails); } - - /** - * Get the permissions defined in the hook_civicrm_permission implementation - * in all enabled CiviCRM module extensions. - * - * @return Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions(). - */ - function getAllModulePermissions() { - $permissions = array(); - $hook_class = CRM_Utils_Hook::singleton(); - $modules = $hook_class->moduleImplements('civicrm_permission'); - foreach ($modules as $module) { - $module_permissions = $this->getModulePermissions($module); - $permissions = array_merge($permissions, $module_permissions); - } - return $permissions; - } } \ No newline at end of file