mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Adjustment to PR #46
This commit is contained in:
@@ -492,11 +492,9 @@ class WireInput extends Wire {
|
|||||||
$info = parse_url($_SERVER['REQUEST_URI']);
|
$info = parse_url($_SERVER['REQUEST_URI']);
|
||||||
$parts = explode('/', $info['path']);
|
$parts = explode('/', $info['path']);
|
||||||
$charset = $config->pageNameCharset;
|
$charset = $config->pageNameCharset;
|
||||||
$i = 0;
|
foreach($parts as $i => $part) {
|
||||||
foreach($parts as $part) {
|
|
||||||
if($i > 0) $url .= "/";
|
if($i > 0) $url .= "/";
|
||||||
$url .= ($charset === 'UTF8' ? $sanitizer->pageNameUTF8($part) : $sanitizer->pageName($part, false));
|
$url .= ($charset === 'UTF8' ? $sanitizer->pageNameUTF8($part) : $sanitizer->pageName($part, false));
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
if(!empty($info['path']) && substr($info['path'], -1) == '/') {
|
if(!empty($info['path']) && substr($info['path'], -1) == '/') {
|
||||||
$url = rtrim($url, '/') . '/'; // trailing slash
|
$url = rtrim($url, '/') . '/'; // trailing slash
|
||||||
|
Reference in New Issue
Block a user