From 98e1d18f56a406bdcd21adb7758167ba501e47ba Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Thu, 13 Oct 2016 14:03:32 +0200 Subject: [PATCH] Alter library search path to include commons libraries Multi-profile inheritance not includes the base profile library path, so this alter hook simply adds the missing path. Change-Id: I2969085faf444d839a85dfd5002e18f30b0d3d67 --- modules/groups/groups_common/groups_common.module | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/groups/groups_common/groups_common.module b/modules/groups/groups_common/groups_common.module index a005314..d2f5d1f 100644 --- a/modules/groups/groups_common/groups_common.module +++ b/modules/groups/groups_common/groups_common.module @@ -64,4 +64,15 @@ function _groups_common_filter_process_format($element) { $function($element); } return $element; -} \ No newline at end of file +} + +/** + * Implements hook_libraries_search_paths_alter() + * + * Add commons profile libraries to library path as part of the base profile + * inheritance. + */ +function groups_common_libraries_search_paths_alter(&$searchdir) { + $profile_commons = drupal_get_path('profile', 'commons'); + $searchdir[] = "$profile_commons/libraries"; +}