]> BookStack Code Mirror - bookstack/blobdiff - app/Book.php
Added initial translation into German (formal)
[bookstack] / app / Book.php
index 919af80a59e746c099aee6f5c166f7998d068575..aa2dee9c0a4540f018857e0d7fcb8693c630250b 100644 (file)
@@ -7,11 +7,15 @@ class Book extends Entity
 
     /**
      * Get the url for this book.
+     * @param string|bool $path
      * @return string
      */
-    public function getUrl()
+    public function getUrl($path = false)
     {
-        return '/books/' . $this->slug;
+        if ($path !== false) {
+            return baseUrl('/books/' . $this->slug . '/' . trim($path, '/'));
+        }
+        return baseUrl('/books/' . $this->slug);
     }
 
     /*