From: Brian Shaughnessy Date: Fri, 8 Jan 2016 21:10:07 +0000 (-0500) Subject: CRM-17798: dont add trailing slash for css extra file X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f02cce8ad746005529f1bda11686186bf3c2b159;p=civicrm-core.git CRM-17798: dont add trailing slash for css extra file --- 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);