Files
FreshRSS/app/Controllers
polybjorn 0c93b26cb5 feat(import): support category field in JSON feed import (#8786)
* Extension to JSON imports: interpret
      "origin": {
        "category": "..."
      },
as category for FreshRSS. When importing a new feed configure the feed
into this category. Creates missiong categories on the fly.

* Fix syntax

* fix(import): tighten JSON category import follow-ups

- Use strict comparison `!== false` after `addCategory()` so a (theoretical)
  zero return from auto-increment is not silently treated as failure
  (matches review feedback on #5638).
- Modernise property declaration to typed property syntax, matching the
  surrounding `$entryDAO`/`$feedDAO` style.
- Pass `$username` to `createCategoryDao()` in `importFile()` so CLI
  imports for a non-current user create categories on the right account,
  matching the adjacent entry/feed DAO instantiations.
- Trim the requested category name and skip if it is empty after trim,
  so a whitespace-only `"category"` value falls back to the default
  category instead of creating a junk row with an empty name. Also
  normalises trailing/leading whitespace so `"  Tech News  "` reuses an
  existing `"Tech News"` category.

* Update app/Controllers/importExportController.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

---------

Co-authored-by: Robert Dahlem <robert.dahlem@gmx.net>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
2026-05-04 15:02:03 +02:00
..
2026-04-16 08:23:43 +02:00