aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-10-28 19:07:14 +0100
committerGravatar GitHub <noreply@github.com> 2025-10-28 19:07:14 +0100
commit49a92c2437d3be9fba8c6af2d3f328ae525d81c6 (patch)
treefa62707782aa152bb5f28af1a4fce863d418a0b9 /app/Controllers
parent6440f9c9a91160103b7c2c369761ada31926c02a (diff)
Mark as read 1 or 7 days based on publication date (#8163)
Allow the UI for marking as read articles older than 1 or 7 days to also work when sorting by publication date (in which case, the publication date is used). <img width="382" height="229" alt="image" src="https://github.com/user-attachments/assets/a630dec8-1e18-4766-8392-59fb593dd73d" />
Diffstat (limited to 'app/Controllers')
-rw-r--r--app/Controllers/entryController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php
index 1d4792267..6bcf7f49e 100644
--- a/app/Controllers/entryController.php
+++ b/app/Controllers/entryController.php
@@ -40,7 +40,8 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
* - id (default: false)
* - get (default: false) /(c_\d+|f_\d+|s|a)/
* - nextGet (default: $get)
- * - idMax (default: 0)
+ * - idMax (default: '0')
+ * - maxPubDate (default: 0)
* - is_read (default: true)
*/
public function readAction(): void {
@@ -52,6 +53,12 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
}
$is_read = Minz_Request::paramTernary('is_read') ?? true;
FreshRSS_Context::$search = new FreshRSS_BooleanSearch(Minz_Request::paramString('search'));
+ $maxPubDate = Minz_Request::paramInt('maxPubDate');
+ if ($maxPubDate > 0) {
+ $search = new FreshRSS_Search('');
+ $search->setMaxPubdate($maxPubDate);
+ FreshRSS_Context::$search->prepend($search);
+ }
FreshRSS_Context::$state = Minz_Request::paramInt('state');
if (FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_FAVORITE)) {