aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/authController.php1
-rw-r--r--app/FreshRSS.php9
-rw-r--r--app/Models/View.php2
-rw-r--r--app/layout/layout.phtml8
-rw-r--r--app/layout/simple.phtml7
5 files changed, 8 insertions, 19 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index ac3fcb0be..82dfefddd 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -182,7 +182,6 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
Minz_Request::good(_t('feedback.auth.login.success'), $url);
} else {
Minz_Log::warning("Password mismatch for user={$username}, nonce={$nonce}, c={$challenge}");
-
header('HTTP/1.1 403 Forbidden');
Minz_Session::_param('POST_to_GET', true); //Prevent infinite internal redirect
Minz_Request::setBadNotification(_t('feedback.auth.login.invalid'));
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 264d8ff1a..c31655aa0 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -16,7 +16,6 @@ class FreshRSS extends Minz_FrontController {
* - Init i18n (need context)
* - Init sharing system (need user conf and i18n)
* - Init generic styles and scripts (need user conf)
- * - Init notifications
* - Enable user extensions (need all the other initializations)
*/
public function init(): void {
@@ -58,7 +57,6 @@ class FreshRSS extends Minz_FrontController {
// Complete initialization of the other FreshRSS / Minz components.
self::initI18n();
- self::loadNotifications();
// Enable extensions for the current (logged) user.
if (FreshRSS_Auth::hasAccess() || FreshRSS_Context::systemConf()->allow_anonymous) {
$ext_list = FreshRSS_Context::userConf()->extensions_enabled;
@@ -151,13 +149,6 @@ class FreshRSS extends Minz_FrontController {
FreshRSS_View::prependScript(Minz_Url::display('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js')));
}
- private static function loadNotifications(): void {
- $notif = Minz_Request::getNotification();
- if (!empty($notif)) {
- FreshRSS_View::_param('notification', $notif);
- }
- }
-
public static function preLayout(): void {
header("X-Content-Type-Options: nosniff");
diff --git a/app/Models/View.php b/app/Models/View.php
index 8346b3ce8..9c601b1d1 100644
--- a/app/Models/View.php
+++ b/app/Models/View.php
@@ -27,8 +27,6 @@ class FreshRSS_View extends Minz_View {
public array $tagsForEntry;
/** @var array<string,array<string>> */
public array $tagsForEntries;
- /** @var array<string,string> */
- public array $notification;
public bool $excludeMutedFeeds;
// Substriptions
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index adbd52327..ba6dc4a96 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -77,10 +77,10 @@ if (_t('gen.dir') === 'rtl') {
<?php
$msg = '';
$status = 'closed';
- if (!empty($this->notification)) {
- $msg = $this->notification['content'];
- $status = $this->notification['type'];
-
+ $notif = Minz_Request::getNotification();
+ if (!empty($notif)) {
+ $msg = $notif['content'];
+ $status = $notif['type'];
invalidateHttpCache();
}
?>
diff --git a/app/layout/simple.phtml b/app/layout/simple.phtml
index f2e6bbd25..065b69fb9 100644
--- a/app/layout/simple.phtml
+++ b/app/layout/simple.phtml
@@ -59,9 +59,10 @@
<?php
$msg = '';
$status = 'closed';
- if (!empty($this->notification)) {
- $msg = $this->notification['content'];
- $status = $this->notification['type'];
+ $notif = Minz_Request::getNotification();
+ if (!empty($notif)) {
+ $msg = $notif['content'];
+ $status = $notif['type'];
invalidateHttpCache();
}
?>