File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ public function showDelete(string $bookSlug, string $pageSlug)
260260 $ page = $ this ->pageRepo ->getBySlug ($ bookSlug , $ pageSlug );
261261 $ this ->checkOwnablePermission ('page-delete ' , $ page );
262262 $ this ->setPageTitle (trans ('entities.pages_delete_named ' , ['pageName ' => $ page ->getShortName ()]));
263- $ usedAsTemplate =
263+ $ usedAsTemplate =
264264 Book::query ()->where ('default_template_id ' , '= ' , $ page ->id )->count () > 0 ||
265265 Chapter::query ()->where ('default_template_id ' , '= ' , $ page ->id )->count () > 0 ;
266266
@@ -282,7 +282,7 @@ public function showDeleteDraft(string $bookSlug, int $pageId)
282282 $ page = $ this ->pageRepo ->getById ($ pageId );
283283 $ this ->checkOwnablePermission ('page-update ' , $ page );
284284 $ this ->setPageTitle (trans ('entities.pages_delete_draft_named ' , ['pageName ' => $ page ->getShortName ()]));
285- $ usedAsTemplate =
285+ $ usedAsTemplate =
286286 Book::query ()->where ('default_template_id ' , '= ' , $ page ->id )->count () > 0 ||
287287 Chapter::query ()->where ('default_template_id ' , '= ' , $ page ->id )->count () > 0 ;
288288
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public function getNewDraftPage(Entity $parent)
142142 } else {
143143 $ defaultTemplate = $ page ->book ->defaultTemplate ;
144144 }
145-
145+
146146 if ($ defaultTemplate && userCan ('view ' , $ defaultTemplate )) {
147147 $ page ->forceFill ([
148148 'html ' => $ defaultTemplate ->html ,
You can’t perform that action at this time.
0 commit comments