diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-02-26 05:23:28 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-03-05 05:31:18 +0300 |
commit | 287aad82841f0f0e85406192b2f1f865bc0be67d (patch) | |
tree | d9c035a484c3f2727d7fa1cdf14ccd213c308508 /core/UrlHelper.php | |
parent | a1cb3695319b321f92bb0a4fd31892a9bc1bdf38 (diff) |
Faster flattening for many reports
Diffstat (limited to 'core/UrlHelper.php')
-rw-r--r-- | core/UrlHelper.php | 5 |
1 files changed, 4 insertions, 1 deletions
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']; |