mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-01-19 08:42:48 +08:00
fixed error from phpcs
This commit is contained in:
parent
8c6b116472
commit
0fc02a2532
|
@ -260,7 +260,7 @@ class PageController extends Controller
|
|||
$page = $this->pageRepo->getBySlug($bookSlug, $pageSlug);
|
||||
$this->checkOwnablePermission('page-delete', $page);
|
||||
$this->setPageTitle(trans('entities.pages_delete_named', ['pageName' => $page->getShortName()]));
|
||||
$usedAsTemplate =
|
||||
$usedAsTemplate =
|
||||
Book::query()->where('default_template_id', '=', $page->id)->count() > 0 ||
|
||||
Chapter::query()->where('default_template_id', '=', $page->id)->count() > 0;
|
||||
|
||||
|
@ -282,7 +282,7 @@ class PageController extends Controller
|
|||
$page = $this->pageRepo->getById($pageId);
|
||||
$this->checkOwnablePermission('page-update', $page);
|
||||
$this->setPageTitle(trans('entities.pages_delete_draft_named', ['pageName' => $page->getShortName()]));
|
||||
$usedAsTemplate =
|
||||
$usedAsTemplate =
|
||||
Book::query()->where('default_template_id', '=', $page->id)->count() > 0 ||
|
||||
Chapter::query()->where('default_template_id', '=', $page->id)->count() > 0;
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ class PageRepo
|
|||
} else {
|
||||
$defaultTemplate = $page->book->defaultTemplate;
|
||||
}
|
||||
|
||||
|
||||
if ($defaultTemplate && userCan('view', $defaultTemplate)) {
|
||||
$page->forceFill([
|
||||
'html' => $defaultTemplate->html,
|
||||
|
|
Loading…
Reference in New Issue
Block a user