From ea54c1ae2c7456b40b420b589ed03218011cb5db Mon Sep 17 00:00:00 2001 From: Lola Slade Date: Sun, 27 Apr 2014 15:46:38 -0700 Subject: [PATCH] Also cleanup trailing slash if there is one on language domain. --- CRM/Utils/System/Drupal.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index 57ce825b68..55a346ed32 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -864,6 +864,10 @@ AND u.status = 1 if (isset($language->domain) && $language->domain) { if ($addLanguagePart) { $cleanedUrl = preg_replace('#^https?://#', '', $language->domain); + // drupal function base_path() adds a "/" to the beginning and end of the returned path + if(substr($cleanedUrl, -1) == '/') { + $cleanedUrl = substr($cleanedUrl, 0, -1); + } $url = (CRM_Utils_System::isSSL() ? 'https' : 'http') . '://' . $cleanedUrl . base_path(); } if ($removeLanguagePart && defined('CIVICRM_UF_BASEURL')) { -- 2.25.1