Skip to content

Commit

Permalink
fix(PageService): Fix page link for index pages
Browse files Browse the repository at this point in the history
Fixes: #1490

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Nov 5, 2024
1 parent 9729f64 commit 733f839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/PageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ public function delete(int $collectiveId, int $id, string $userId): void {
public function getPageLink(string $collectiveName, PageInfo $pageInfo, bool $withFileId = true): string {
$collectiveRoute = rawurlencode($collectiveName);
$pagePathRoute = implode('/', array_map('rawurlencode', explode('/', $pageInfo->getFilePath())));
$pageTitleRoute = rawurlencode($pageInfo->getTitle());
$pageTitleRoute = ($pageInfo->getFileName() === PageInfo::INDEX_PAGE_TITLE . PageInfo::SUFFIX) ? '' : rawurlencode($pageInfo->getTitle());
$fullRoute = implode('/', array_filter([
$collectiveRoute,
$pagePathRoute,
Expand Down

0 comments on commit 733f839

Please sign in to comment.