1
0
mirror of https://github.com/suk-ws/ph-Bookshelf.git synced 2024-12-05 09:26:52 +08:00

修复 page 的指向链接中没有添加 bookId 的问题

This commit is contained in:
A.C.Sukazyo Eyre 2021-05-01 15:48:12 +08:00
parent 6568161485
commit 55610855f4
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD

View File

@ -72,7 +72,16 @@ class Page {
} }
public function getSummaryHtml (): string { public function getSummaryHtml (): string {
$str = "<li class='page-contented chapter" . (PageMeta::$page->getId()==$this->id?" active":"") . "'><a class='page-contented' " . (PageMeta::$page->getId()==$this->id?"":(PageMeta::$book->getId()." href='/".$this->id."'")) . ">$this->name</a>"; $str =
"<li class='page-contented chapter" .
(PageMeta::$page->getId()==$this->id?" active":"") .
"'><a class='page-contented' " .
(
PageMeta::$page->getId()==$this->id ?
"" :
"href='/".PageMeta::$book->getId()."/".$this->id."' "
) .
">$this->name</a>";
if (sizeof($this->segues) > 0) { if (sizeof($this->segues) > 0) {
$str .= "<ul class='page-contented summary'>"; $str .= "<ul class='page-contented summary'>";
foreach ($this->segues as $node) { foreach ($this->segues as $node) {