Files
FreshRSS/app/Models
i @manandAlexandre Alapetite 4e8a258b01 Support choosing the sort type when creating or editing a user query (#8954)
* Support choosing the sort type when creating or editing a user query

Changes
- User queries can now store a sort field (sort type), not only the sort
  direction. The create and edit forms expose a single combined dropdown
  (field + direction) that reuses the existing `index.menu.sort.*` options,
  matching the global reading-settings sort UI.
- The "Bookmark current query" action now also remembers the current sort
  field, where it previously kept only the order direction.
- Relabel the query sort control from "Sort by date" to "Sort by"; other
  languages are marked for re-translation (// TODO).
- Add a CHANGELOG entry and credit the contributor in CREDITS.

Implementation
- `FreshRSS_UserQuery`: add an optional `sort` property mirroring `order`
  (constructor parsing, `toArray()`, `getSort()` falling back to the user
  default sort, and a `hasParameters()` check).
- `configureController`: split the combined dropdown value into `sort` and
  `order`, validating the field against the implemented sort types
  (`id`, `c.name`, `date`, `f.name`, `length`, `link`, `title`, `rand`);
  separate `sort`/`order` request parameters are still accepted so the
  "bookmark current query" flow keeps working.
- Views render the combined dropdown and persist `sort` as a hidden field.
- `p/api/query.php`: back-fill `sort` from the saved query when the request
  does not provide one, mirroring the existing `order` handling.
- Add unit tests covering the sort round-trip and `toArray()` inclusion.

Compatibility
- No database or schema change: user queries are stored in the per-user PHP
  config array, which keeps arbitrary keys verbatim, so no migration is
  required.
- Upgrade: existing queries without `sort` fall back to the user default
  sort; behaviour is unchanged until a sort is explicitly chosen.
- Downgrade: older versions ignore the extra `sort` key and keep working;
  re-saving under an old version simply drops the key with no data loss.
- Shared query URLs without a `sort` parameter remain valid.

* Refresh README translation statistics

* i18n: fr

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-11-02 21:43:05 +01:00
..
2024-12-27 12:12:49 +01:00
2026-10-15 16:11:21 +02:00
2026-09-30 15:49:06 +02:00
2025-08-31 20:05:30 +02:00
2024-12-27 12:12:49 +01:00
2024-12-27 12:12:49 +01:00
2026-10-26 21:02:32 +01:00
2026-01-03 18:09:44 +01:00
2026-10-26 21:02:32 +01:00