4.7 broken links on Drupal upgrade
authormonishdeb <monish.deb@webaccessglobal.com>
Wed, 30 Sep 2015 21:37:48 +0000 (03:07 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Wed, 30 Sep 2015 21:37:48 +0000 (03:07 +0530)
CRM/Core/Config/MagicMerge.php

index f8ea50f7332ef46e9af9e8ecbfca587c0052cb6c..8b72f09e51cb7a3734c86d11c790409e45d997c3 100644 (file)
@@ -232,13 +232,10 @@ class CRM_Core_Config_MagicMerge {
         return $value;
 
       case 'setting-url-abs':
-        $value = $this->getSettings()->get($name);
-        $this->cache[$k] = Civi::paths()->getUrl($value, 'absolute');
-        return $this->cache[$k];
-
       case 'setting-url-rel':
-        $value = $this->getSettings()->get($name);
-        $this->cache[$k] = Civi::paths()->getUrl($value, 'relative');
+        $type = (strstr($type, 'abs')) ? 'absolute' : 'relative';
+        $value =  CRM_Utils_File::addTrailingSlash($this->getSettings()->get($name));
+        $this->cache[$k] = Civi::paths()->getUrl($value, $type);
         return $this->cache[$k];
 
       case 'runtime':