mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-28 19:07:37 +03:00
Updated all application urls to allow path prefix.
Allows BookStack to be installed at a non-root location on a domain. Closes #40.
This commit is contained in:
@@ -7,10 +7,14 @@ class Book extends Entity
|
||||
|
||||
/**
|
||||
* Get the url for this book.
|
||||
* @param string|bool $path
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl()
|
||||
public function getUrl($path = false)
|
||||
{
|
||||
if ($path !== false) {
|
||||
return baseUrl('/books/' . $this->slug . '/' . trim($path, '/'));
|
||||
}
|
||||
return baseUrl('/books/' . $this->slug);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user