X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ef1b98019a0c3f123b0add8428292807eac3fe05..refs/pull/2511/head:/app/Entities/Models/Bookshelf.php diff --git a/app/Entities/Models/Bookshelf.php b/app/Entities/Models/Bookshelf.php index 11860d376..8ffd06d2e 100644 --- a/app/Entities/Models/Bookshelf.php +++ b/app/Entities/Models/Bookshelf.php @@ -1,8 +1,5 @@ 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, '/')])); } /** @@ -88,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