aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/javascript_vars.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-12-18 17:59:16 +0100
committerGravatar GitHub <noreply@github.com> 2023-12-18 17:59:16 +0100
commita80a5f48a16e7d232168a7aaa68e9a1804235ce1 (patch)
treea515b88592629dea7e83b96e26e2452d3f98a98e /app/views/helpers/javascript_vars.phtml
parent6bb45a87268157aab961a6a4a728d9a9bbe043b0 (diff)
Pass PHPStan level 8 (#5946)
* Pass PHPStan level 8 And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels * Revert wrong replace in comment * Fix PHPStan level 8 * Update PHPStan and other dev dependencies * Remove obsolete comment * noVariableVariables and towards bleedingEdge https://github.com/phpstan/phpstan-strict-rules https://phpstan.org/blog/what-is-bleeding-edge * More bleedingEdge * A bit more PHPStan level 9 * More PHPStan level 9 * Prepare for booleansInConditions Ignore int and null * Revert wrong line * More fixes * Fix keep_max_n_unread * Stricter attribute functions * Stricter callHooks and more PHPStan level 9 * More typing * A tiny more
Diffstat (limited to 'app/views/helpers/javascript_vars.phtml')
-rw-r--r--app/views/helpers/javascript_vars.phtml22
1 files changed, 11 insertions, 11 deletions
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 38a7751ee..29f78e5ee 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -1,27 +1,27 @@
<?php
declare(strict_types=1);
/** @var FreshRSS_View $this */
-$mark = FreshRSS_Context::$user_conf->mark_when;
-$s = FreshRSS_Context::$user_conf->shortcuts;
+$mark = FreshRSS_Context::userConf()->mark_when;
+$s = FreshRSS_Context::userConf()->shortcuts;
$extData = Minz_ExtensionManager::callHook('js_vars', []);
echo htmlspecialchars(json_encode(array(
'context' => array(
'anonymous' => !FreshRSS_Auth::hasAccess(),
'auto_remove_article' => !!FreshRSS_Context::isAutoRemoveAvailable(),
- 'hide_posts' => !(FreshRSS_Context::$user_conf->display_posts || Minz_Request::actionName() === 'reader'),
- 'display_order' => Minz_Request::paramString('order') ?: FreshRSS_Context::$user_conf->sort_order,
- 'display_categories' => FreshRSS_Context::$user_conf->display_categories,
+ 'hide_posts' => !(FreshRSS_Context::userConf()->display_posts || Minz_Request::actionName() === 'reader'),
+ 'display_order' => Minz_Request::paramString('order') ?: FreshRSS_Context::userConf()->sort_order,
+ 'display_categories' => FreshRSS_Context::userConf()->display_categories,
'auto_mark_article' => !!$mark['article'],
'auto_mark_site' => !!$mark['site'],
'auto_mark_scroll' => !!$mark['scroll'],
'auto_mark_focus' => !!$mark['focus'],
- 'auto_load_more' => !!FreshRSS_Context::$user_conf->auto_load_more,
+ 'auto_load_more' => !!FreshRSS_Context::userConf()->auto_load_more,
'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,
+ 'does_lazyload' => !!FreshRSS_Context::userConf()->lazyload ,
+ 'sides_close_article' => !!FreshRSS_Context::userConf()->sides_close_article,
'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(),
- 'html5_notif_timeout' => FreshRSS_Context::$user_conf->html5_notif_timeout,
- 'auth_type' => FreshRSS_Context::$system_conf->auth_type,
+ 'html5_notif_timeout' => FreshRSS_Context::userConf()->html5_notif_timeout,
+ 'auth_type' => FreshRSS_Context::systemConf()->auth_type,
'current_view' => Minz_Request::actionName(),
'csrf' => FreshRSS_Auth::csrfToken(),
'mtime' => [
@@ -69,7 +69,7 @@ echo htmlspecialchars(json_encode(array(
'notif_request_failed' => _t('gen.js.feedback.request_failed'),
'category_empty' => _t('gen.js.category_empty'),
'labels_empty' => _t('gen.js.labels_empty'),
- 'language' => FreshRSS_Context::$user_conf->language,
+ 'language' => FreshRSS_Context::userConf()->language,
),
'icons' => array(
'read' => rawurlencode(_i('read')),