From 6bb45a87268157aab961a6a4a728d9a9bbe043b0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 15 Dec 2023 23:04:29 +0100 Subject: Add filter actions (auto mark read) at category and global levels (#5942) * Add filter actions (auto mark read) at category level fix https://github.com/FreshRSS/FreshRSS/issues/3497 * Add filter actions (auto mark read) at global level fix https://github.com/FreshRSS/FreshRSS/issues/2788 * Fix feed category ID * Minor comment --- app/Models/UserConfiguration.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'app/Models/UserConfiguration.php') diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php index d75c76bcb..0aec3a05f 100644 --- a/app/Models/UserConfiguration.php +++ b/app/Models/UserConfiguration.php @@ -72,10 +72,31 @@ declare(strict_types=1); * @property array $volatile */ final class FreshRSS_UserConfiguration extends Minz_Configuration { + use FreshRSS_FilterActionsTrait; /** @throws Minz_ConfigurationNamespaceException */ public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_UserConfiguration { parent::register('user', $config_filename, $default_filename); return parent::get('user'); } + + /** + * @phpstan-return ($key is non-empty-string ? mixed : array) + * @return array|mixed|null + */ + public function attributes(string $key = '') { + if ($key === '') { + return []; // Not implemented for user configuration + } else { + return parent::param($key, null); + } + } + + /** @param string|array|bool|int|null $value Value, not HTML-encoded */ + public function _attributes(string $key, $value = null): void { + if ($key == '') { + return; // Not implemented for user configuration + } + parent::_param($key, $value); + } } -- cgit v1.2.3