A free, self-hostable news aggregator…
Fix feed title option (#6771)
Alexandre Alapetiteefa0a9217167
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.phpindex a50cf1ef7..385bd1e2e 100644--- a/app/Controllers/configureController.php+++ b/app/Controllers/configureController.php@@ -114,17 +114,17 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {public function readingAction(): void {if (Minz_Request::isPost()) {FreshRSS_Context::userConf()->posts_per_page = Minz_Request::paramInt('posts_per_page') ?: 10;- FreshRSS_Context::userConf()->view_mode = Minz_Request::paramString('view_mode', true) ?: 'normal';- FreshRSS_Context::userConf()->default_view = Minz_Request::paramString('default_view') ?: 'adaptive';+ FreshRSS_Context::userConf()->view_mode = Minz_Request::paramStringNull('view_mode', true) ?? 'normal';+ FreshRSS_Context::userConf()->default_view = Minz_Request::paramStringNull('default_view') ?? 'adaptive';FreshRSS_Context::userConf()->show_fav_unread = Minz_Request::paramBoolean('show_fav_unread');FreshRSS_Context::userConf()->auto_load_more = Minz_Request::paramBoolean('auto_load_more');FreshRSS_Context::userConf()->display_posts = Minz_Request::paramBoolean('display_posts');- FreshRSS_Context::userConf()->display_categories = Minz_Request::paramString('display_categories') ?: 'active';- FreshRSS_Context::userConf()->show_tags = Minz_Request::paramString('show_tags') ?: '0';+ FreshRSS_Context::userConf()->display_categories = Minz_Request::paramStringNull('display_categories') ?? 'active';+ FreshRSS_Context::userConf()->show_tags = Minz_Request::paramStringNull('show_tags') ?? '0';FreshRSS_Context::userConf()->show_tags_max = Minz_Request::paramInt('show_tags_max');- FreshRSS_Context::userConf()->show_author_date = Minz_Request::paramString('show_author_date') ?: '0';- FreshRSS_Context::userConf()->show_feed_name = Minz_Request::paramString('show_feed_name') ?: 't';- FreshRSS_Context::userConf()->show_article_icons = Minz_Request::paramString('show_article_icons') ?: 't';+ FreshRSS_Context::userConf()->show_author_date = Minz_Request::paramStringNull('show_author_date') ?? '0';+ FreshRSS_Context::userConf()->show_feed_name = Minz_Request::paramStringNull('show_feed_name') ?? 't';+ FreshRSS_Context::userConf()->show_article_icons = Minz_Request::paramStringNull('show_article_icons') ?? 't';FreshRSS_Context::userConf()->hide_read_feeds = Minz_Request::paramBoolean('hide_read_feeds');FreshRSS_Context::userConf()->onread_jump_next = Minz_Request::paramBoolean('onread_jump_next');FreshRSS_Context::userConf()->lazyload = Minz_Request::paramBoolean('lazyload');diff --git a/lib/Minz/Request.php b/lib/Minz/Request.phpindex 63464e8f1..1f15730fb 100644--- a/lib/Minz/Request.php+++ b/lib/Minz/Request.php@@ -106,7 +106,7 @@ class Minz_Request {return 0;}- public static function paramString(string $key, bool $specialchars = false): string {+ public static function paramStringNull(string $key, bool $specialchars = false): ?string {if (isset(self::$params[$key])) {$s = self::$params[$key];if (is_string($s)) {@@ -117,7 +117,11 @@ class Minz_Request {return (string)$s;}}- return '';+ return null;+ }++ public static function paramString(string $key, bool $specialchars = false): string {+ return self::paramStringNull($key, $specialchars) ?? '';}/**