diff options
| author | 2023-11-16 22:43:00 +0100 | |
|---|---|---|
| committer | 2023-11-16 22:43:00 +0100 | |
| commit | 30c7a61a9b410f023c56ef19b9389a61647d8768 (patch) | |
| tree | bb58408980ce5b86f1d2b4a9be29d55b2d46dbb1 /app/views | |
| parent | ee99e7e2cc228500efc1b539954c0ca6cd4c146d (diff) | |
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 <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/views')
61 files changed, 119 insertions, 62 deletions
diff --git a/app/views/auth/formLogin.phtml b/app/views/auth/formLogin.phtml index 29f98d20b..6deade3f4 100644 --- a/app/views/auth/formLogin.phtml +++ b/app/views/auth/formLogin.phtml @@ -1,4 +1,7 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <main class="prompt"> <h1><?= _t('gen.auth.login') ?></h1> diff --git a/app/views/auth/index.phtml b/app/views/auth/index.phtml index 45183592a..78762c19e 100644 --- a/app/views/auth/index.phtml +++ b/app/views/auth/index.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml index 98276452f..953b07b0d 100644 --- a/app/views/auth/register.phtml +++ b/app/views/auth/register.phtml @@ -1,4 +1,7 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <main class="prompt"> <h1><?= _t('gen.auth.registration') ?></h1> diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml index 47281e2f1..6004cec1b 100644 --- a/app/views/configure/archiving.phtml +++ b/app/views/configure/archiving.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 131583408..b48dcbf71 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/configure/integration.phtml b/app/views/configure/integration.phtml index 34c10b3c3..fc3cc2a32 100644 --- a/app/views/configure/integration.phtml +++ b/app/views/configure/integration.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> @@ -66,7 +66,7 @@ <input type="hidden" id="share_<?= $key ?>_type" name="share[<?= $key ?>][type]" value="<?= $share->type() ?>" /> <input type="hidden" id="share_<?= $key ?>_method" name="share[<?= $key ?>][method]" value="<?= $share->method() ?>" /> <input type="hidden" id="share_<?= $key ?>_field" name="share[<?= $key ?>][field]" value="<?= $share->field() ?>" /> - + <?php if ($share->isDeprecated()) { ?> <div class="prompt alert alert-warn"> <p><?= _t('conf.sharing.deprecated') ?></p> @@ -82,13 +82,13 @@ data-leave-validation="<?= $share->name() ?>" /> </div> </div> - + <div class="form-group"> <?php if ($share->formType() === 'advanced') { ?> <label class="group-name" for="share_<?= $key ?>_url"> <?= _t('conf.sharing.share_url') ?> </label> - + <div class="group-controls"> <div class="stick"> <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="long" value="<?= $share->baseUrl() ?>" @@ -99,7 +99,7 @@ </div> <?php } ?> </div> - + <div class="form-group"> <div class="group-controls"> <button type="button" class="remove btn btn-attention" title="<?= _t('conf.sharing.remove') ?>"><?= _t('gen.action.remove') ?></button> diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml index 24c06ac5a..2a55eb1b2 100644 --- a/app/views/configure/queries.phtml +++ b/app/views/configure/queries.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> @@ -19,7 +19,7 @@ <a class="configure open-slider" href="<?= _url('configure', 'query', 'id', '' . $key) ?>"><?= _i('configure') ?></a><h2><?= $query->getName() ?></h2> <input type="hidden" id="queries_<?= $key ?>_name" name="queries[<?= $key ?>][name]" value="<?= $query->getName() ?>"/> <input type="hidden" id="queries_<?= $key ?>_url" name="queries[<?= $key ?>][url]" value="<?= $query->getUrl() ?>"/> - <input type="hidden" id="queries_<?= $key ?>_search" name="queries[<?= $key ?>][search]" value="<?= urlencode($query->getSearch()) ?>"/> + <input type="hidden" id="queries_<?= $key ?>_search" name="queries[<?= $key ?>][search]" value="<?= urlencode($query->getSearch()->getRawInput()) ?>"/> <input type="hidden" id="queries_<?= $key ?>_state" name="queries[<?= $key ?>][state]" value="<?= $query->getState() ?>"/> <input type="hidden" id="queries_<?= $key ?>_order" name="queries[<?= $key ?>][order]" value="<?= $query->getOrder() ?>"/> <input type="hidden" id="queries_<?= $key ?>_get" name="queries[<?= $key ?>][get]" value="<?= $query->getGet() ?>"/> diff --git a/app/views/configure/query.phtml b/app/views/configure/query.phtml index 9284ae94e..e45820fbc 100644 --- a/app/views/configure/query.phtml +++ b/app/views/configure/query.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ if (!Minz_Request::paramBoolean('ajax')) { diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index 669fa7a16..5f22d4daf 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index ca4a42c86..e578938cd 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml index b1522749f..d19698932 100644 --- a/app/views/configure/system.phtml +++ b/app/views/configure/system.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/entry/bookmark.phtml b/app/views/entry/bookmark.phtml index 9c3fe2076..192e805a0 100644 --- a/app/views/entry/bookmark.phtml +++ b/app/views/entry/bookmark.phtml @@ -1,5 +1,7 @@ -<?php /** @var FreshRSS_View $this */ ?> <?php +declare(strict_types=1); +/** @var FreshRSS_View $this */ + header('Content-Type: application/json; charset=UTF-8'); $url = array( diff --git a/app/views/entry/read.phtml b/app/views/entry/read.phtml index 2d1760b87..071782895 100644 --- a/app/views/entry/read.phtml +++ b/app/views/entry/read.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ header('Content-Type: application/json; charset=UTF-8'); diff --git a/app/views/error/index.phtml b/app/views/error/index.phtml index abebc8332..50ad16eba 100644 --- a/app/views/error/index.phtml +++ b/app/views/error/index.phtml @@ -1,4 +1,7 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <main class="post"> <div class="alert alert-error"> <h1 class="alert-head"><?= $this->code ?></h1> diff --git a/app/views/extension/configure.phtml b/app/views/extension/configure.phtml index 27946e202..c722b3a1e 100644 --- a/app/views/extension/configure.phtml +++ b/app/views/extension/configure.phtml @@ -1,3 +1,4 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ $this->renderHelper('extension/configure'); diff --git a/app/views/extension/index.phtml b/app/views/extension/index.phtml index 9b8c122e6..7bec7b233 100644 --- a/app/views/extension/index.phtml +++ b/app/views/extension/index.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml index 3461e6e61..c51289f56 100644 --- a/app/views/feed/add.phtml +++ b/app/views/feed/add.phtml @@ -1,5 +1,8 @@ -<?php /** @var FreshRSS_View $this */ ?> -<?php if ($this->feed) { ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ + if ($this->feed) { +?> <main class="post"> <h1><?= _t('sub.feed.add') ?></h1> diff --git a/app/views/feed/contentSelectorPreview.phtml b/app/views/feed/contentSelectorPreview.phtml index 7ff251e38..a5afb10f4 100644 --- a/app/views/feed/contentSelectorPreview.phtml +++ b/app/views/feed/contentSelectorPreview.phtml @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ FreshRSS::preLayout(); ?> 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 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <div class="post"> <h2> <?= $this->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 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <div class="post"> <h2><?= $this->query->getName() ?></h2> @@ -20,7 +23,7 @@ <div class="form-group"> <label class="group-name" for=""><?= _t('conf.query.filter.search') ?></label> <div class="group-controls"> - <input type="text" id="query_search" name="query[search]" value="<?= htmlspecialchars($this->query->getSearch(), ENT_COMPAT, 'UTF-8') ?>"/> + <input type="text" id="query_search" name="query[search]" value="<?= htmlspecialchars($this->query->getSearch()->getRawInput(), ENT_COMPAT, 'UTF-8') ?>"/> </div> </div> <div class="form-group"> 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 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ $username = Minz_User::name() ?? Minz_User::INTERNAL_USER; diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml index 8b067b8ff..2c3e004fc 100644 --- a/app/views/helpers/export/opml.phtml +++ b/app/views/helpers/export/opml.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @param array<FreshRSS_Feed> $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 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ if (!Minz_Request::paramBoolean('ajax')) { $this->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 @@ -<?php /** @var FreshRSS_View $this */ ?> - <?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ + $name_encoded = urlencode($this->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 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <div class="post" id="feed_update"> <h1><?= $this->feed->name() ?></h1> 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 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $bottomline_read = FreshRSS_Context::$user_conf->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 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $topline_read = FreshRSS_Context::$user_conf->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 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ $mark = FreshRSS_Context::$user_conf->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 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $c = Minz_Request::controllerName(); $a = Minz_Request::actionName(); $params = $_GET; ?> - <?php if ($this->nbPage > 1) { ?> <nav class="nav-pagination nav-list"> <ul class="pagination"> diff --git a/app/views/helpers/stream-footer.phtml b/app/views/helpers/stream-footer.phtml index 9b61ae44f..41f4315b5 100644 --- a/app/views/helpers/stream-footer.phtml +++ b/app/views/helpers/stream-footer.phtml @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $url_next = Minz_Request::currentRequest(); $url_next['params']['next'] = FreshRSS_Context::$next_id; @@ -12,15 +13,14 @@ 'get' => FreshRSS_Context::currentGet(), 'nextGet' => FreshRSS_Context::$next_get, 'idMax' => FreshRSS_Context::$id_max, - 'search' => htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), + 'search' => htmlspecialchars_decode(FreshRSS_Context::$search->getRawInput(), ENT_QUOTES), 'state' => FreshRSS_Context::$state, ) ); -?> -<?php -$hasAccess = FreshRSS_Auth::hasAccess(); -if ($hasAccess) { ?> + $hasAccess = FreshRSS_Auth::hasAccess(); + if ($hasAccess) { +?> <form id="stream-footer" action="" method="post"> <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <?php } else { ?> diff --git a/app/views/importExport/export.phtml b/app/views/importExport/export.phtml index 21ed71b2d..af0b21ea1 100644 --- a/app/views/importExport/export.phtml +++ b/app/views/importExport/export.phtml @@ -1,2 +1,4 @@ -<?php /** @var FreshRSS_View $this */ ?> -<?= $this->content ?> +<?php +declare(strict_types=1); +/** @var FreshRSS_View $this */ +echo $this->content; diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml index adc236dc4..3e8fde09f 100644 --- a/app/views/importExport/index.phtml +++ b/app/views/importExport/index.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_subscription'); ?> - <main class="post "> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml index 1966c1f6b..5ee1729cd 100644 --- a/app/views/index/about.phtml +++ b/app/views/index/about.phtml @@ -1,10 +1,10 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ if (FreshRSS_Auth::hasAccess()) { $this->partial('aside_configure'); } ?> - <main class="post content<?= !FreshRSS_Auth::hasAccess() ? ' centered' : ''?>"> <?php if (FreshRSS_Auth::hasAccess()) {?> <div class="link-back-wrapper"> diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index 6e3b2378b..0ddc22e11 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('nav_menu'); @@ -12,7 +13,6 @@ $state_unread = true; } ?> - <main id="stream" class="global<?= $class ?>"> <h1 class="title_hidden"><?= _t('conf.reading.view.global') ?></h1> <?php diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml index cba6f5243..7913405ca 100644 --- a/app/views/index/logs.phtml +++ b/app/views/index/logs.phtml @@ -1,5 +1,8 @@ -<?php /** @var FreshRSS_View $this */ ?> -<?php $this->partial('aside_configure'); ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ + $this->partial('aside_configure'); +?> <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index aee2ea2a2..feda1466f 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ if (!Minz_Request::paramBoolean('ajax')) { $this->partial('aside_feed'); diff --git a/app/views/index/opml.phtml b/app/views/index/opml.phtml index 69dace924..f55461165 100644 --- a/app/views/index/opml.phtml +++ b/app/views/index/opml.phtml @@ -1,3 +1,4 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ $this->renderHelper('export/opml'); diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index 014b1ab42..dc90a144a 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ if (!Minz_Request::paramBoolean('ajax')) { $this->partial('aside_feed'); diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml index f9c9d9297..a6d0d2a10 100644 --- a/app/views/index/rss.phtml +++ b/app/views/index/rss.phtml @@ -1,4 +1,7 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <?= '<?xml version="1.0" encoding="UTF-8" ?>'; ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" <?= $this->rss_base == '' ? '' : ' xml:base="' . $this->rss_base . '"' ?> diff --git a/app/views/index/tos.phtml b/app/views/index/tos.phtml index 8a9c2f583..6a2aa7ce8 100644 --- a/app/views/index/tos.phtml +++ b/app/views/index/tos.phtml @@ -1,10 +1,10 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ if (FreshRSS_Auth::hasAccess()) { $this->partial('aside_configure'); } ?> - <main class="post content<?= !FreshRSS_Auth::hasAccess() ? ' centered' : ''?>"> <?php if (FreshRSS_Auth::hasAccess()) {?> <div class="link-back-wrapper"> diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml index 1a8af6e49..bce316d85 100644 --- a/app/views/javascript/actualize.phtml +++ b/app/views/javascript/actualize.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_ViewJavascript $this */ $categories = []; diff --git a/app/views/javascript/nbUnreadsPerFeed.phtml b/app/views/javascript/nbUnreadsPerFeed.phtml index 4864b429a..f82893f13 100644 --- a/app/views/javascript/nbUnreadsPerFeed.phtml +++ b/app/views/javascript/nbUnreadsPerFeed.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_ViewJavascript $this */ $result = array( diff --git a/app/views/javascript/nonce.phtml b/app/views/javascript/nonce.phtml index df1389f15..e7dceb339 100644 --- a/app/views/javascript/nonce.phtml +++ b/app/views/javascript/nonce.phtml @@ -1,3 +1,4 @@ <?php +declare(strict_types=1); /** @var FreshRSS_ViewJavascript $this */ echo json_encode(array('salt1' => $this->salt1, 'nonce' => $this->nonce)); diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml index 37cc92144..a671bb83e 100644 --- a/app/views/stats/idle.phtml +++ b/app/views/stats/idle.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_ViewStats $this */ $this->partial('aside_subscription'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/stats/index.phtml b/app/views/stats/index.phtml index 593474ac7..4e14d0fc7 100644 --- a/app/views/stats/index.phtml +++ b/app/views/stats/index.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_ViewStats $this */ $this->partial('aside_subscription'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml index 6923f6992..030db0906 100644 --- a/app/views/stats/repartition.phtml +++ b/app/views/stats/repartition.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_ViewStats $this */ $this->partial('aside_subscription'); ?> - <main class="post "> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/subscription/add.phtml b/app/views/subscription/add.phtml index 1f07e2931..2dfc8c705 100644 --- a/app/views/subscription/add.phtml +++ b/app/views/subscription/add.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_subscription'); ?> - <main class="post drop-section"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/subscription/bookmarklet.phtml b/app/views/subscription/bookmarklet.phtml index 540bf8e52..d96f8a35b 100644 --- a/app/views/subscription/bookmarklet.phtml +++ b/app/views/subscription/bookmarklet.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_subscription'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/subscription/category.phtml b/app/views/subscription/category.phtml index 0b63ebc17..daf4523bb 100644 --- a/app/views/subscription/category.phtml +++ b/app/views/subscription/category.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ if (!Minz_Request::paramBoolean('ajax')) { diff --git a/app/views/subscription/feed.phtml b/app/views/subscription/feed.phtml index e361cff39..934e3c690 100644 --- a/app/views/subscription/feed.phtml +++ b/app/views/subscription/feed.phtml @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** @var FreshRSS_View $this */ if (!Minz_Request::paramBoolean('ajax')) { diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index 6881d0a8d..280799f2d 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_subscription'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/tag/getTagsForEntry.phtml b/app/views/tag/getTagsForEntry.phtml index 46a82ca68..b2a0d78a7 100644 --- a/app/views/tag/getTagsForEntry.phtml +++ b/app/views/tag/getTagsForEntry.phtml @@ -1,3 +1,4 @@ -<?php /** @var FreshRSS_View $this */ ?> <?php +declare(strict_types=1); +/** @var FreshRSS_View $this */ echo json_encode($this->tagsForEntry); diff --git a/app/views/tag/index.phtml b/app/views/tag/index.phtml index c80e0c209..eed8906c4 100644 --- a/app/views/tag/index.phtml +++ b/app/views/tag/index.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_subscription'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/update/apply.phtml b/app/views/update/apply.phtml index 077eb2184..291e634f8 100644 --- a/app/views/update/apply.phtml +++ b/app/views/update/apply.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/update/checkInstall.phtml b/app/views/update/checkInstall.phtml index 393a9fdee..19e3d2e1e 100644 --- a/app/views/update/checkInstall.phtml +++ b/app/views/update/checkInstall.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/update/index.phtml b/app/views/update/index.phtml index 2e24b3086..c93d1a75e 100644 --- a/app/views/update/index.phtml +++ b/app/views/update/index.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/user/details.phtml b/app/views/user/details.phtml index a2a560a65..1ea8f62d8 100644 --- a/app/views/user/details.phtml +++ b/app/views/user/details.phtml @@ -1,14 +1,13 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ if (!Minz_Request::paramBoolean('ajax')) { $this->partial('aside_configure'); } + $isDefault = $this->details['is_default']; + $isAdmin = $this->details['is_admin']; + $enabled = $this->details['enabled']; ?> - -<?php $isDefault = $this->details['is_default']; ?> -<?php $isAdmin = $this->details['is_admin']; ?> -<?php $enabled = $this->details['enabled']; ?> - <div class="post"> <h2><?= $this->username ?><?php if ($isAdmin) echo ' ― ', _t('admin.user.admin'); ?></h2> <form method="post" action="<?= _url('user', 'manage', 'username', $this->username); ?>"> diff --git a/app/views/user/manage.phtml b/app/views/user/manage.phtml index 827ba39da..dcff153d6 100644 --- a/app/views/user/manage.phtml +++ b/app/views/user/manage.phtml @@ -1,8 +1,8 @@ <?php + declare(strict_types=1); /** @var FreshRSS_View $this */ $this->partial('aside_configure'); ?> - <main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> diff --git a/app/views/user/profile.phtml b/app/views/user/profile.phtml index b5fbb04b5..0a41d4dc4 100644 --- a/app/views/user/profile.phtml +++ b/app/views/user/profile.phtml @@ -1,5 +1,6 @@ -<?php /** @var FreshRSS_View $this */ ?> <?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ if (!$this->disable_aside) { $this->partial('aside_configure'); } diff --git a/app/views/user/validateEmail.phtml b/app/views/user/validateEmail.phtml index bd36510dd..8f822fe6a 100644 --- a/app/views/user/validateEmail.phtml +++ b/app/views/user/validateEmail.phtml @@ -1,4 +1,7 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <main class="post"> <p> <?= _t('user.email.validation.need_to', FreshRSS_Context::$system_conf->title) ?> diff --git a/app/views/user_mailer/email_need_validation.txt.php b/app/views/user_mailer/email_need_validation.txt.php index 2785911bf..5799499e7 100644 --- a/app/views/user_mailer/email_need_validation.txt.php +++ b/app/views/user_mailer/email_need_validation.txt.php @@ -1,4 +1,7 @@ -<?php /** @var FreshRSS_View $this */ ?> +<?php + declare(strict_types=1); + /** @var FreshRSS_View $this */ +?> <?= _t('user.mailer.email_need_validation.welcome', $this->username) ?> <?= _t('user.mailer.email_need_validation.body', $this->site_title) ?> |
