From c7a3281a73839590bfa9d8a9e73c41fc35fc2847 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 22 Dec 2023 11:03:32 +0100 Subject: Fix notifications (#5959) The notification about wrong login was not working. Noticed while working on https://github.com/FreshRSS/FreshRSS/pull/5955 This was due to timing of when the notification is retrieved. Simplified code to make the logic easier and more robust. --- app/FreshRSS.php | 9 --------- 1 file changed, 9 deletions(-) (limited to 'app/FreshRSS.php') 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"); -- cgit v1.2.3