From 287aad82841f0f0e85406192b2f1f865bc0be67d Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Thu, 26 Feb 2015 02:23:28 +0000 Subject: Faster flattening for many reports --- core/UrlHelper.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/UrlHelper.php') diff --git a/core/UrlHelper.php b/core/UrlHelper.php index a0bc340bbd..78682acbfc 100644 --- a/core/UrlHelper.php +++ b/core/UrlHelper.php @@ -231,7 +231,10 @@ class UrlHelper $parsedUrl = parse_url($url); $result = ''; if (isset($parsedUrl['path'])) { - $result .= substr($parsedUrl['path'], 1); + if (substr($parsedUrl['path'], 0, 1) == '/') { + $parsedUrl['path'] = substr($parsedUrl['path'], 1); + } + $result .= $parsedUrl['path']; } if (isset($parsedUrl['query'])) { $result .= '?' . $parsedUrl['query']; -- cgit v1.2.3