From 30c7a61a9b410f023c56ef19b9389a61647d8768 Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Thu, 16 Nov 2023 22:43:00 +0100 Subject: Use strict_types (#5830) * Little's optimisations and booleans in conditions * Apply strict type * Apply strict type * Apply strict type * Fix multiple bugs with PHP 8.2 and 8.3 * Many declares missing, more errors fixed * Apply strict type * Another approach * Stronger typing for Minz_Session * Fix case of SQLite --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- app/views/helpers/category/update.phtml | 5 ++++- app/views/helpers/configure/query.phtml | 7 +++++-- app/views/helpers/export/articles.phtml | 1 + app/views/helpers/export/opml.phtml | 1 + app/views/helpers/extension/configure.phtml | 1 + app/views/helpers/extension/details.phtml | 5 +++-- app/views/helpers/feed/update.phtml | 5 ++++- app/views/helpers/index/normal/entry_bottom.phtml | 1 + app/views/helpers/index/normal/entry_header.phtml | 1 + app/views/helpers/javascript_vars.phtml | 3 ++- app/views/helpers/logs_pagination.phtml | 2 +- app/views/helpers/stream-footer.phtml | 10 +++++----- 12 files changed, 29 insertions(+), 13 deletions(-) (limited to 'app/views/helpers') diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml index a0986ff04..7f8fecbf8 100644 --- a/app/views/helpers/category/update.phtml +++ b/app/views/helpers/category/update.phtml @@ -1,4 +1,7 @@ - +

category->name() ?> diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml index f8d51c193..0f76bc202 100644 --- a/app/views/helpers/configure/query.phtml +++ b/app/views/helpers/configure/query.phtml @@ -1,4 +1,7 @@ - +

query->getName() ?>

@@ -20,7 +23,7 @@
- +
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index 1db627bf7..6903c3c69 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -1,4 +1,5 @@ $feeds diff --git a/app/views/helpers/extension/configure.phtml b/app/views/helpers/extension/configure.phtml index e3a6b1b0c..5cf7f9c0a 100644 --- a/app/views/helpers/extension/configure.phtml +++ b/app/views/helpers/extension/configure.phtml @@ -1,4 +1,5 @@ partial('aside_configure'); diff --git a/app/views/helpers/extension/details.phtml b/app/views/helpers/extension/details.phtml index f200ce0d8..b8d0d784f 100644 --- a/app/views/helpers/extension/details.phtml +++ b/app/views/helpers/extension/details.phtml @@ -1,6 +1,7 @@ - - ext_details->getName()); $ext_enabled = $this->ext_details->isEnabled(); if ($ext_enabled) { diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index 680bc2399..af2503256 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -1,4 +1,7 @@ - +

feed->name() ?>

diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 37a6de042..dba0e44a3 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -1,4 +1,5 @@ bottomline_read; $bottomline_favorite = FreshRSS_Context::$user_conf->bottomline_favorite; diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 4cfb5beda..6a693b0a9 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -1,4 +1,5 @@ topline_read; $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite; diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 8ee8a7e21..1798187d0 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -1,4 +1,5 @@ mark_when; $s = FreshRSS_Context::$user_conf->shortcuts; @@ -15,7 +16,7 @@ echo htmlspecialchars(json_encode(array( 'auto_mark_scroll' => !!$mark['scroll'], 'auto_mark_focus' => !!$mark['focus'], 'auto_load_more' => !!FreshRSS_Context::$user_conf->auto_load_more, - 'auto_actualize_feeds' => !!Minz_Session::param('actualize_feeds', false), + 'auto_actualize_feeds' => Minz_Session::paramBoolean('actualize_feeds'), 'does_lazyload' => !!FreshRSS_Context::$user_conf->lazyload , 'sides_close_article' => !!FreshRSS_Context::$user_conf->sides_close_article, 'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(), diff --git a/app/views/helpers/logs_pagination.phtml b/app/views/helpers/logs_pagination.phtml index 349be0760..309a80e6b 100644 --- a/app/views/helpers/logs_pagination.phtml +++ b/app/views/helpers/logs_pagination.phtml @@ -1,10 +1,10 @@ - nbPage > 1) { ?>