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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user