From 6996447d5404973a095fa57d16d4588cb1005f13 Mon Sep 17 00:00:00 2001 From: Gerard Alvear Porras <55630227+Elgeryy1@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:47:56 +0200 Subject: [PATCH] Allow selecting a category in feed add URLs (#9047) * Support categories in feed add URLs ## Summary - Honour the `category` query parameter when opening the add-feed form. - Keep the existing `cat_id` parameter as a backwards-compatible fallback. - Use `category` for the add-feed links in the subscription view. This makes the URL proposed in #4160 select the intended category: `?c=feed&a=add&category=1&url_rss=https://example.com/feed.xml`. ## Validation - PHP syntax checks for the changed controller and templates. - Focused request-parameter checks for explicit `category`, legacy `cat_id`, and the default category. Fixes #4160 * Simplify and small fixes --------- Co-authored-by: Gerard Alvear Co-authored-by: Alexandre Alapetite --- app/Controllers/feedController.php | 1 + app/views/feed/add.phtml | 2 +- app/views/subscription/bookmarklet.phtml | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index f94788ed3..df9eeafbe 100644 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -124,6 +124,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { * GET request displays a form to add and configure a feed. * Request parameter is: * - url_rss (default: false) + * - cat_id (default: 1) * * POST request adds a feed in database. * Parameters are: diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml index 1fd659688..39a7631fe 100644 --- a/app/views/feed/add.phtml +++ b/app/views/feed/add.phtml @@ -58,7 +58,7 @@