From 47c3df529b2fe37572e11ac6fd5c2ea713603ea1 Mon Sep 17 00:00:00 2001 From: chmst Date: Mon, 4 Mar 2024 09:07:15 +0100 Subject: [PATCH 1/3] Remove unsed variable --- libraries/src/Application/CMSApplication.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/libraries/src/Application/CMSApplication.php b/libraries/src/Application/CMSApplication.php index 37df60b8fc8d1..c6005683c2bf4 100644 --- a/libraries/src/Application/CMSApplication.php +++ b/libraries/src/Application/CMSApplication.php @@ -236,9 +236,6 @@ public function enqueueMessage($msg, $type = self::MSG_INFO) 'type' => $inputFilter->clean(strtolower($type), 'cmd'), ]; - // For empty queue, if messages exists in the session, enqueue them first. - $messages = $this->getMessageQueue(); - if (!\in_array($message, $this->messageQueue)) { // Enqueue the message. $this->messageQueue[] = $message; From 1a57b41a871a43bf61e8ab1c4abe121e34e67c3b Mon Sep 17 00:00:00 2001 From: chmst Date: Mon, 4 Mar 2024 11:32:54 +0100 Subject: [PATCH 2/3] fix as reuested --- libraries/src/Application/CMSApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/src/Application/CMSApplication.php b/libraries/src/Application/CMSApplication.php index c6005683c2bf4..f43692595eba5 100644 --- a/libraries/src/Application/CMSApplication.php +++ b/libraries/src/Application/CMSApplication.php @@ -236,7 +236,7 @@ public function enqueueMessage($msg, $type = self::MSG_INFO) 'type' => $inputFilter->clean(strtolower($type), 'cmd'), ]; - if (!\in_array($message, $this->messageQueue)) { + if (!\in_array($message, $this->getMessageQueue())) { // Enqueue the message. $this->messageQueue[] = $message; } From b950f38dbed7609604bf437490e45a811c5c8892 Mon Sep 17 00:00:00 2001 From: chmst Date: Mon, 4 Mar 2024 12:16:44 +0100 Subject: [PATCH 3/3] Add a comment --- libraries/src/Application/CMSApplication.php | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/src/Application/CMSApplication.php b/libraries/src/Application/CMSApplication.php index f43692595eba5..3baaac1f80669 100644 --- a/libraries/src/Application/CMSApplication.php +++ b/libraries/src/Application/CMSApplication.php @@ -236,6 +236,7 @@ public function enqueueMessage($msg, $type = self::MSG_INFO) 'type' => $inputFilter->clean(strtolower($type), 'cmd'), ]; + // Get the messages of the session and add the new message if it is not already in the queue. if (!\in_array($message, $this->getMessageQueue())) { // Enqueue the message. $this->messageQueue[] = $message;