Skip to content

Conversation

@norimine11
Copy link
Contributor

@ryuring
以下のように修正しました!
レビューお願いします!

・デフォルトで公開状態のエントリーのみを取得する
・デフォルトで最新のエントリーから表示する
・エントリーリスト取得時にcrrentContentをセットする

Copilot AI review requested due to automatic review settings September 9, 2025 11:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issues with custom content entry list retrieval by adding default values for query conditions and resolving a problem where currentContent was not being properly set.

  • Adds default values for entry status (publish), order (created), and direction (DESC)
  • Sets currentContent in the request to ensure proper context availability
  • Ensures only published entries are shown by default and displays them in descending order by creation date

Comment on lines +519 to +520
$request = $this->getView()->getRequest()->withAttribute('currentContent', $content);
$this->getView()->setRequest($request);
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Creating a new request object just to set an attribute and then replacing the view's request could be simplified. Consider using a more direct approach if the framework provides one, or at minimum add a comment explaining why this pattern is necessary.

Copilot uses AI. Check for mistakes.
@ryuring
Copy link
Collaborator

ryuring commented Sep 10, 2025

@norimine11 ありがとうございます、マージしますね

@ryuring ryuring merged commit 0dc4b09 into baserproject:5.1.x Sep 10, 2025
1 check passed
@momofff momofff added this to the 5.1.10 milestone Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants