Skip to content

Commit

Permalink
Squashed commit of the following: (#4081)
Browse files Browse the repository at this point in the history
    draftの存在判定追加
  • Loading branch information
CUkomori authored Dec 12, 2024
1 parent ce25638 commit 378a8e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/bc-blog/src/Model/Table/BlogPostsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
});
Expand Down

0 comments on commit 378a8e8

Please sign in to comment.