diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index bcda947ff..aedb7a2e6 100644 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -346,7 +346,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController { FreshRSS_View::appendScript(Minz_Url::display('/scripts/draggable.js?' . @filemtime(PUBLIC_PATH . '/scripts/draggable.js'))); if (Minz_Request::isPost()) { - /** @var array $params */ + /** @var array $params */ $params = Minz_Request::paramArray('queries'); $queries = []; @@ -358,6 +359,10 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController { if (!empty($query['search'])) { $query['search'] = urldecode($query['search']); } + $shareRss = $query['shareRss'] ?? null; + $query['shareRss'] = (is_string($shareRss) && ctype_digit($shareRss)) ? (bool)$shareRss : false; + $shareOpml = $query['shareOpml'] ?? null; + $query['shareOpml'] = (is_string($shareOpml) && ctype_digit($shareOpml)) ? (bool)$shareOpml : false; $queries[$key] = (new FreshRSS_UserQuery($query, FreshRSS_Context::categories(), FreshRSS_Context::labels()))->toArray(); } FreshRSS_Context::userConf()->queries = $queries; diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php index 2cb11bbe4..88263e1ad 100644 --- a/app/Models/UserConfiguration.php +++ b/app/Models/UserConfiguration.php @@ -44,7 +44,8 @@ declare(strict_types=1); * @property bool $onread_jump_next * @property string $passwordHash * @property int $posts_per_page - * @property array $queries + * @property array $queries * @property bool $reading_confirm * @property int $since_hours_posts_per_rss * @property bool $show_fav_unread diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml index 1e925d19c..bd1e0b370 100644 --- a/app/views/configure/queries.phtml +++ b/app/views/configure/queries.phtml @@ -21,8 +21,8 @@

getName() ?>

- - + + diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 6779a4560..266e95b65 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -1057,8 +1057,10 @@ function recursive_unlink(string $dir): bool { /** * Remove queries where $get is appearing. * @param string $get the get attribute which should be removed. - * @param array $queries an array of queries. - * @return array without queries where $get is appearing. + * @param array $queries an array of queries. + * @return array without queries where $get is appearing. */ function remove_query_by_get(string $get, array $queries): array { $final_queries = [];