Fixed minor bug in roots_relative_url

This commit is contained in:
Scott Walkinshaw
2011-07-11 19:45:27 -06:00
parent 16583d1d27
commit 539198ac83

View File

@@ -83,7 +83,7 @@ function roots_root_relative_url($input) {
// if full URL is site_url, return a slash for relative root
'if (isset($matches[0]) && $matches[0] === site_url()) { return "/";' .
// if domain is equal to site_url, then make URL relative
'} elseif (isset($matches[1]) && strpos($matches[1], site_url()) !== false) { return "$matches[2]";' .
'} elseif (isset($matches[0]) && strpos($matches[0], site_url()) !== false) { return $matches[2];' .
// if domain is not equal to site_url, do not make external link relative
'} else { return $matches[0]; };'
),