Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-02-26 05:23:28 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-03-05 05:31:18 +0300
commit287aad82841f0f0e85406192b2f1f865bc0be67d (patch)
treed9c035a484c3f2727d7fa1cdf14ccd213c308508 /core/UrlHelper.php
parenta1cb3695319b321f92bb0a4fd31892a9bc1bdf38 (diff)
Faster flattening for many reports
Diffstat (limited to 'core/UrlHelper.php')
-rw-r--r--core/UrlHelper.php5
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'];