aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/categoryController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/categoryController.php')
-rw-r--r--app/Controllers/categoryController.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/Controllers/categoryController.php b/app/Controllers/categoryController.php
index 5ad83e977..2212a158b 100644
--- a/app/Controllers/categoryController.php
+++ b/app/Controllers/categoryController.php
@@ -171,6 +171,30 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
}
}
+ public function viewFilterAction(): void {
+ $id = Minz_Request::paramInt('id');
+ if ($id === 0) {
+ Minz_Error::error(400);
+ return;
+ }
+ $filteractions = Minz_Request::paramTextToArray('filteractions_read');
+ $filteractions = array_map(fn(string $action): string => trim($action), $filteractions);
+ $filteractions = array_filter($filteractions, fn(string $action): bool => $action !== '');
+ $search = "c:$id (";
+ foreach ($filteractions as $action) {
+ $search .= "($action) OR ";
+ }
+ $search = preg_replace('/ OR $/', '', $search);
+ $search .= ')';
+ Minz_Request::forward([
+ 'c' => 'index',
+ 'a' => 'index',
+ 'params' => [
+ 'search' => $search,
+ ],
+ ], redirect: true);
+ }
+
/**
* This action deletes a category.
* Feeds in the given category are moved in the default category.