aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-12-31 17:00:51 +0100
committerGravatar GitHub <noreply@github.com> 2021-12-31 17:00:51 +0100
commit77e9877316fcfacb26799afdf32d94c8411da80e (patch)
tree7fd9c85bf4854054be6536c14d120bc8b790debe /app/Controllers/indexController.php
parent09c84fb3bc44bf8e45619c27acc15b967aea14ce (diff)
Add PHPStan (#4021)
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
Diffstat (limited to 'app/Controllers/indexController.php')
-rwxr-xr-xapp/Controllers/indexController.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index ff746f4bf..eadfe252b 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -41,12 +41,12 @@ class FreshRSS_index_Controller extends Minz_ActionController {
$this->view->categories = FreshRSS_Context::$categories;
- $this->view->rss_title = FreshRSS_Context::$name . ' | ' . Minz_View::title();
+ $this->view->rss_title = FreshRSS_Context::$name . ' | ' . FreshRSS_View::title();
$title = FreshRSS_Context::$name;
if (FreshRSS_Context::$get_unread > 0) {
$title = '(' . FreshRSS_Context::$get_unread . ') ' . $title;
}
- Minz_View::prependTitle($title . ' · ');
+ FreshRSS_View::prependTitle($title . ' · ');
FreshRSS_Context::$id_max = time() . '000000';
@@ -104,8 +104,8 @@ class FreshRSS_index_Controller extends Minz_ActionController {
return;
}
- Minz_View::appendScript(Minz_Url::display('/scripts/extra.js?' . @filemtime(PUBLIC_PATH . '/scripts/extra.js')));
- Minz_View::appendScript(Minz_Url::display('/scripts/global_view.js?' . @filemtime(PUBLIC_PATH . '/scripts/global_view.js')));
+ FreshRSS_View::appendScript(Minz_Url::display('/scripts/extra.js?' . @filemtime(PUBLIC_PATH . '/scripts/extra.js')));
+ FreshRSS_View::appendScript(Minz_Url::display('/scripts/global_view.js?' . @filemtime(PUBLIC_PATH . '/scripts/global_view.js')));
try {
$this->updateContext();
@@ -115,12 +115,12 @@ class FreshRSS_index_Controller extends Minz_ActionController {
$this->view->categories = FreshRSS_Context::$categories;
- $this->view->rss_title = FreshRSS_Context::$name . ' | ' . Minz_View::title();
+ $this->view->rss_title = FreshRSS_Context::$name . ' | ' . FreshRSS_View::title();
$title = _t('index.feed.title_global');
if (FreshRSS_Context::$get_unread > 0) {
$title = '(' . FreshRSS_Context::$get_unread . ') ' . $title;
}
- Minz_View::prependTitle($title . ' · ');
+ FreshRSS_View::prependTitle($title . ' · ');
$this->_csp([
'default-src' => "'self'",
@@ -161,7 +161,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
// No layout for RSS output.
$this->view->url = PUBLIC_TO_INDEX_PATH . '/' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']);
- $this->view->rss_title = FreshRSS_Context::$name . ' | ' . Minz_View::title();
+ $this->view->rss_title = FreshRSS_Context::$name . ' | ' . FreshRSS_View::title();
$this->view->_layout(false);
header('Content-Type: application/rss+xml; charset=utf-8');
}
@@ -253,7 +253,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
* This action displays the about page of FreshRSS.
*/
public function aboutAction() {
- Minz_View::prependTitle(_t('index.about.title') . ' · ');
+ FreshRSS_View::prependTitle(_t('index.about.title') . ' · ');
}
/**
@@ -270,7 +270,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
$this->view->terms_of_service = $terms_of_service;
$this->view->can_register = !max_registrations_reached();
- Minz_View::prependTitle(_t('index.tos.title') . ' · ');
+ FreshRSS_View::prependTitle(_t('index.tos.title') . ' · ');
}
/**
@@ -281,7 +281,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
Minz_Error::error(403);
}
- Minz_View::prependTitle(_t('index.log.title') . ' · ');
+ FreshRSS_View::prependTitle(_t('index.log.title') . ' · ');
if (Minz_Request::isPost()) {
FreshRSS_LogDAO::truncate();