From c06c58392d187011776ac8c4fd486ffa432325ec Mon Sep 17 00:00:00 2001 From: komori Date: Thu, 12 Dec 2024 13:12:39 +0900 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 5d67ecae16da23cc6abfdda5ef87ea6a1ec75f68 Author: komori Date: Thu Dec 12 13:11:29 2024 +0900 draftの存在判定追加 --- plugins/bc-blog/src/Model/Table/BlogPostsTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bc-blog/src/Model/Table/BlogPostsTable.php b/plugins/bc-blog/src/Model/Table/BlogPostsTable.php index 0654861ecd..2725380405 100755 --- a/plugins/bc-blog/src/Model/Table/BlogPostsTable.php +++ b/plugins/bc-blog/src/Model/Table/BlogPostsTable.php @@ -871,7 +871,7 @@ public function getPublishByNo(int $blogContentId, mixed $no, bool $preview = fa */ public function findAll(Query $query, array $options = []): Query { - if($options['draft'] !== false) return $query; + if(!isset($options['draft']) || $options['draft'] !== false) return $query; return $query->formatResults(function(CollectionInterface $results) { return $results->map([$this, 'excludeDraftFields']); });