Repository navigation
Conversation
| $criteria = $user_criteria['criteria']; | ||
|
|
||
| $groups = []; | ||
| $groups = []; |
There was a problem hiding this comment.
This variable is build from a SQL query but is never used.
There was a problem hiding this comment.
You're right. The $groups array is no longer used after the refactoring.
The issue was introduced when I extracted the common group criteria logic into getItemsForUserCriteria(). The original showItems() code populated $groups from the group query, but after the refactoring the display logic relies on $group_choices instead. This left the $groups array and its associated query unused.
I'll remove $groups and $groups_iterator from showItems(). The groups_ids query in getItemsForUserCriteria() will remain, since those IDs are still required to build the user/group criteria.
Co-authored-by: Adrien Clairembault <42734840+AdrienClairembault@users.noreply.github.com>
Co-authored-by: Adrien Clairembault <42734840+AdrienClairembault@users.noreply.github.com>
|
Thanks for pointing this out. I checked the current version of So, in the current commit, the SQL result is actually used. I believe this comment may refer to an earlier state of the diff before the subsequent commits updated this section. |
Can you please clarify how the content of $group is used after bien populated? |
Removed unused groups fetching logic from user criteria.
|
You're right. The The issue was introduced when I extracted the common group criteria logic into I'll remove |
Co-authored-by: Curtis Conard <cconard96@gmail.com>
fix for COUNT DISTINCT
|
|
||
| $query = [ | ||
| 'SELECT' => [ | ||
| 'COUNT DISTINCT' => "$table.id AS cpt", |
There was a problem hiding this comment.
fix for COUNT DISTINCT in select
Thanks for pointing this out. I corrected the query by moving The latest CI run is now passing, including the PHP 8.3/MySQL and PHP 8.5/MariaDB test suites, lint checks, Playwright tests, and the security scan. Thanks again for the feedback and for helping improve this PR. |
|
IA;DR |

Checklist before requesting a review
Please delete options that are not relevant.
Description
Screenshots (if appropriate):