diff options
| author | 2025-05-17 22:52:30 +0200 | |
|---|---|---|
| committer | 2025-05-17 22:52:30 +0200 | |
| commit | 9fbde0605bef39be3f92e316806d33864b044967 (patch) | |
| tree | 5213ad21288016cec6ceb9200005ee6294816c41 /app/layout | |
| parent | 52848d414d63bbb57042741bd56d97a7fea06653 (diff) | |
Keep sort and order during navigation (#7585)
* Keep sort and order during navigation
fix https://github.com/FreshRSS/FreshRSS/issues/7584
* Sanitize
* Minor format
* Avoid uneeded HTML escaping
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/aside_feed.phtml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index ca4fd1911..3d4103731 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -3,15 +3,21 @@ /** @var FreshRSS_View $this */ $actual_view = Minz_Request::actionName(); $class = ''; - if (FreshRSS_Context::userConf()->hide_read_feeds && - (FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) || FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_OR_NOT_READ)) && - !FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_READ)) { - $class = ' state_unread'; - } + if (FreshRSS_Context::userConf()->hide_read_feeds && + (FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) || FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_OR_NOT_READ)) && + !FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_READ)) { + $class = ' state_unread'; + } - $state_filter_manual = Minz_Request::paramString('state'); - if ($state_filter_manual !== '') { - $state_filter_manual = '&state=' . $state_filter_manual; + $state_filter_manual = ''; + if (($s = Minz_Request::paramString('state', plaintext: true)) !== '' && ctype_digit($s)) { + $state_filter_manual .= '&state=' . $s; + } + if (($s = Minz_Request::paramString('sort', plaintext: true)) !== '' && ctype_alpha($s)) { + $state_filter_manual .= '&sort=' . $s; + } + if (($s = Minz_Request::paramString('order', plaintext: true)) !== '' && ctype_alpha($s)) { + $state_filter_manual .= '&order=' . $s; } ?> <nav class="nav aside aside_feed<?= $class ?>" id="aside_feed"> |
