mirror of
https://github.com/YGGverse/gemini-php.git
synced 2026-03-31 17:05:29 +00:00
update getPagePath filter
This commit is contained in:
parent
8378bac08b
commit
85e83f7f49
1 changed files with 8 additions and 5 deletions
|
|
@ -34,17 +34,20 @@ class Filesystem
|
|||
|
||||
public function getPagePathByUri(string $uri): ?string
|
||||
{
|
||||
$uri = urldecode(
|
||||
$uri
|
||||
);
|
||||
|
||||
$path = sprintf(
|
||||
'%s/pages/%s.txt',
|
||||
$this->_path,
|
||||
str_replace(
|
||||
':',
|
||||
'/',
|
||||
$uri
|
||||
trim(
|
||||
mb_strtolower(
|
||||
urldecode(
|
||||
$uri
|
||||
)
|
||||
),
|
||||
':'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue