From 2102546d465ec21633f92ae8bb39084714b7ba1f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 14 Nov 2013 13:21:41 +1300 Subject: [PATCH] CRM-13737 drupal integration - Use basename fn to extract last dir in the url as suggested by @totten --- CRM/Utils/System/DrupalBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index 7efe21bb62..efd4b6036e 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -114,7 +114,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { */ function appendCoreDirectoryToResourceBase($url) { global $civicrm_root; - $lastDirectory = implode(',', array_slice(explode('/', $civicrm_root), -1, 1, TRUE)); + $lastDirectory = basename($civicrm_root); if(!$lastDirectory != 'civicrm') { return $url .= $lastDirectory . '/'; } -- 2.25.1