Skip to content

Commit

Permalink
chore(PageService): Fix page variable name in getPageByFile()
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Mar 27, 2024
1 parent 5747e7c commit 6aba520
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Service/PageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,17 @@ private function getParentPageId(File $file, ?Node $parent = null): int {
* @throws NotFoundException
*/
private function getPageByFile(File $file, ?Node $parent = null): PageInfo {
$trashPageInfo = new PageInfo();
$pageInfo = new PageInfo();
try {
$trashPage = $this->pageMapper->findByFileId($file->getId());
$page = $this->pageMapper->findByFileId($file->getId());
} catch (InvalidPathException | FilesNotFoundException $e) {
throw new NotFoundException($e->getMessage(), 0, $e);
}
$lastUserId = ($trashPage !== null) ? $trashPage->getLastUserId() : null;
$emoji = ($trashPage !== null) ? $trashPage->getEmoji() : null;
$subpageOrder = ($trashPage !== null) ? $trashPage->getSubpageOrder() : null;
$lastUserId = ($page !== null) ? $page->getLastUserId() : null;
$emoji = ($page !== null) ? $page->getEmoji() : null;
$subpageOrder = ($page !== null) ? $page->getSubpageOrder() : null;
try {
$trashPageInfo->fromFile($file,
$pageInfo->fromFile($file,
$this->getParentPageId($file, $parent),
$lastUserId,
$lastUserId ? $this->userManager->getDisplayName($lastUserId) : null,
Expand All @@ -204,7 +204,7 @@ private function getPageByFile(File $file, ?Node $parent = null): PageInfo {
throw new NotFoundException($e->getMessage(), 0, $e);
}

return $trashPageInfo;
return $pageInfo;
}

/**
Expand Down

0 comments on commit 6aba520

Please sign in to comment.