1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added indexes, Reduced queries on pages

This commit is contained in:
Dan Brown
2015-11-26 23:45:04 +00:00
parent 3825ea8c14
commit 22f8a408fa
19 changed files with 319 additions and 48 deletions

View File

@ -18,7 +18,8 @@ class Chapter extends Entity
public function getUrl()
{
return '/books/' . $this->book->slug . '/chapter/' . $this->slug;
$bookSlug = isset($this->bookSlug) ? $this->bookSlug : $this->book->slug;
return '/books/' . $bookSlug. '/chapter/' . $this->slug;
}
public function getExcerpt($length = 100)