From f02cce8ad746005529f1bda11686186bf3c2b159 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Fri, 8 Jan 2016 16:10:07 -0500 Subject: [PATCH] CRM-17798: dont add trailing slash for css extra file --- CRM/Core/Config/MagicMerge.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Config/MagicMerge.php b/CRM/Core/Config/MagicMerge.php index 884a65a25d..22e9c4090a 100644 --- a/CRM/Core/Config/MagicMerge.php +++ b/CRM/Core/Config/MagicMerge.php @@ -187,7 +187,7 @@ class CRM_Core_Config_MagicMerge { // "setting-url-*" properties are settings with special filtering // to return normalized URLs (in either absolute or relative format). - 'customCSSURL' => array('setting-url-abs'), + 'customCSSURL' => array('setting-url-abs-noslash'), 'extensionsURL' => array('setting-url-abs'), 'imageUploadURL' => array('setting-url-abs'), 'resourceBase' => array('setting-url-rel', 'userFrameworkResourceURL'), @@ -232,9 +232,11 @@ class CRM_Core_Config_MagicMerge { case 'setting-url-abs': case 'setting-url-rel': + case 'setting-url-rel-noslash': + $noslash = ($type == 'setting-url-abs-noslash') ? true : false; $type = (strstr($type, 'abs')) ? 'absolute' : 'relative'; $value = $this->getSettings()->get($name); - if ($value) { + if ($value && !$noslash) { $value = CRM_Utils_File::addTrailingSlash($value); } $this->cache[$k] = Civi::paths()->getUrl($value, $type); -- 2.25.1