From 9100ecb2c8246d0489b74142f5bd30a538f532e8 Mon Sep 17 00:00:00 2001 From: Lola Slade Date: Sun, 27 Apr 2014 13:16:10 -0700 Subject: [PATCH] CRM-14489 - Removed protocol from language domain if it exists. --- CRM/Utils/System/Drupal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index c9c9bf5675..7e7cc6083d 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -863,7 +863,8 @@ AND u.status = 1 if ($urlType == LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN) { if (isset($language->domain) && $language->domain) { if ($addLanguagePart) { - $url = (CRM_Utils_System::isSSL() ? 'https' : 'http') . '://' . $language->domain . base_path(); + $cleaned_url = preg_replace('#^https?://#', '', $language->domain); + $url = (CRM_Utils_System::isSSL() ? 'https' : 'http') . '://' . $cleaned_url . base_path(); } if ($removeLanguagePart && defined('CIVICRM_UF_BASEURL')) { $url = str_replace('\\', '/', $url); -- 2.25.1