X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c7a2d568bf693add30c8402d68d1f46f09a44c5b..refs/pull/2393/head:/app/Entities/Models/Bookshelf.php diff --git a/app/Entities/Models/Bookshelf.php b/app/Entities/Models/Bookshelf.php index 474ba51cd..8ffd06d2e 100644 --- a/app/Entities/Models/Bookshelf.php +++ b/app/Entities/Models/Bookshelf.php @@ -1,4 +1,4 @@ -slug) . '/' . trim($path, '/')); - } - return url('/http/source.bookstackapp.com/shelves/' . urlencode($this->slug)); + return url('/http/source.bookstackapp.com/shelves/' . implode('/', [urlencode($this->slug), trim($path, '/')])); } /** @@ -85,17 +80,6 @@ class Bookshelf extends Entity implements HasCoverImage return 'cover_shelf'; } - /** - * Get an excerpt of this book's description to the specified length or less. - * @param int $length - * @return string - */ - public function getExcerpt(int $length = 100) - { - $description = $this->description; - return mb_strlen($description) > $length ? mb_substr($description, 0, $length-3) . '...' : $description; - } - /** * Check if this shelf contains the given book. * @param Book $book