From 378a8e81f1f5428a3d7a8af20efb5232a322cf51 Mon Sep 17 00:00:00 2001 From: CUkomori <102940192+CUkomori@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:09:39 +0900 Subject: [PATCH] Squashed commit of the following: (#4081) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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']); });