1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Added bookshelves homepage options

- Updated homepage selection UI to be more scalable
- Cleaned homepage selection logic in code
- Added seed test data for bookshelves
- Added bookshelves to permission system
This commit is contained in:
Dan Brown
2018-09-20 15:27:30 +01:00
parent 47b08888ba
commit 81eb642f75
16 changed files with 192 additions and 61 deletions

View File

@ -1250,14 +1250,14 @@ class EntityRepo
*/
public function destroyPage(Page $page)
{
$this->destroyEntityCommonRelations($page);
// Check if set as custom homepage
$customHome = setting('app-homepage', '0:');
if (intval($page->id) === intval(explode(':', $customHome)[0])) {
throw new NotifyException(trans('errors.page_custom_home_deletion'), $page->getUrl());
}
$this->destroyEntityCommonRelations($page);
// Delete Attached Files
$attachmentService = app(AttachmentService::class);
foreach ($page->attachments as $attachment) {