Browse Source

update getPagePath filter

main
ghost 10 months ago
parent
commit
85e83f7f49
  1. 11
      src/Dokuwiki/Filesystem.php

11
src/Dokuwiki/Filesystem.php

@ -34,18 +34,21 @@ class Filesystem
public function getPagePathByUri(string $uri): ?string public function getPagePathByUri(string $uri): ?string
{ {
$uri = urldecode(
$uri
);
$path = sprintf( $path = sprintf(
'%s/pages/%s.txt', '%s/pages/%s.txt',
$this->_path, $this->_path,
str_replace( str_replace(
':', ':',
'/', '/',
trim(
mb_strtolower(
urldecode(
$uri $uri
) )
),
':'
)
)
); );
if (!in_array($path, $this->_list) || !is_file($path) || !is_readable($path)) if (!in_array($path, $this->_list) || !is_file($path) || !is_readable($path))

Loading…
Cancel
Save