Skip to content
Snippets Groups Projects
Commit 3fe61451 authored by bgm's avatar bgm
Browse files

CRM-13354: fix bad patch for locale detection in Drupal based on domain/suffix

parent 46c53d72
Branches
Tags
No related merge requests found
......@@ -958,7 +958,7 @@ AND u.status = 1
if ($urlType == LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX) {
if (isset($language->prefix) && $language->prefix) {
if ($addLanguagePart) {
$url = (CRM_Utils_System::isSSL() ? 'https' : 'http') . '://' . $language->domain . base_path();
$url .= $language->prefix . '/';
}
if ($removeLanguagePart) {
$url = str_replace("/{$language->prefix}/", '/', $url);
......@@ -969,7 +969,7 @@ AND u.status = 1
if ($urlType == LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN) {
if (isset($language->domain) && $language->domain) {
if ($addLanguagePart) {
$url = CRM_Utils_File::addTrailingSlash($language->domain, '/');
$url = (CRM_Utils_System::isSSL() ? 'https' : 'http') . '://' . $language->domain . base_path();
}
if ($removeLanguagePart && defined('CIVICRM_UF_BASEURL')) {
$url = str_replace('\\', '/', $url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment