[ticket/13073] Use just one regex in helper route()

PHPBB3-13073
This commit is contained in:
Marc Alexander 2014-09-19 12:14:57 +02:00
parent eaef881e7d
commit 4186ced479

View file

@ -147,7 +147,7 @@ class helper
} }
else else
{ {
$base_url .= preg_replace('#[\\/\\\]$#', '', preg_replace('#^\.#', '', $this->phpbb_root_path)); $base_url .= preg_replace('#^(?:(\.))+(?:(.+)?)+(?:([\\/\\\])$)#', '$2', $this->phpbb_root_path);
} }
$base_url = $this->filesystem->clean_path($base_url); $base_url = $this->filesystem->clean_path($base_url);