From e312a9c2e6bc7a132dd74f2a37390f09812c0eb0 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sun, 6 Feb 2022 20:41:42 +0100 Subject: [PATCH] CS fixes --- Blacklight/NNTP.php | 7 +++++-- config/nntmux_nntp.php | 2 +- misc/update/tmux/bin/update_groups.php | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Blacklight/NNTP.php b/Blacklight/NNTP.php index bcfdefbe8..6cd77e2b9 100755 --- a/Blacklight/NNTP.php +++ b/Blacklight/NNTP.php @@ -188,16 +188,17 @@ class NNTP extends \Net_NNTP_Client { $primaryUSP = [ 'ip' => gethostbyname(config('nntmux_nntp.server')), - 'port' => config('nntmux_nntp.port') + 'port' => config('nntmux_nntp.port'), ]; $alternateUSP = [ 'ip_a' => gethostbyname(config('nntmux_nntp.alternate_server')), - 'port_a' => config('nntmux_nntp.alternate_server_port') + 'port_a' => config('nntmux_nntp.alternate_server_port'), ]; $primaryConnections = $this->_tmux->getUSPConnections('primary', $primaryUSP); $alternateConnections = $this->_tmux->getUSPConnections('alternate', $alternateUSP); if ($this->_isConnected() && (($alternate && $this->_currentServer === config('nntmux_nntp.alternate_server') && ($this->_primaryNntpConnections < $alternateConnections['alternate']['active'])) || (! $alternate && $this->_currentServer === config('nntmux_nntp.server') && ($this->_primaryNntpConnections < $primaryConnections['primary']['active'])))) { dump('true'); + return true; } @@ -311,6 +312,7 @@ class NNTP extends \Net_NNTP_Client if (! $compression || (int) Settings::settingValue('..compressedheaders') === 0) { $this->_compressionSupported = false; } + return true; } // If we reached this point and have not connected after all retries, break out of the loop. @@ -1409,6 +1411,7 @@ class NNTP extends \Net_NNTP_Client // 201, Posting NOT allowed case NET_NNTP_PROTOCOL_RESPONSECODE_READY_POSTING_PROHIBITED: $this->_logger?->info('Posting not allowed!'); + return false; default: return $this->_handleErrorResponse($response); diff --git a/config/nntmux_nntp.php b/config/nntmux_nntp.php index 9fa9ade10..5bc58c675 100644 --- a/config/nntmux_nntp.php +++ b/config/nntmux_nntp.php @@ -14,5 +14,5 @@ return [ 'socket_timeout' => env('NNTP_SOCKET_TIMEOUT', 120), 'alternate_server_socket_timeout' => env('NNTP_SOCKET_TIMEOUT_A', 120), 'main_nntp_connections' => env('NNTP_CONNECTIONS', 1), - 'alternate_nntp_connections' => env('NNTP_CONNECTIONS_A', 1) + 'alternate_nntp_connections' => env('NNTP_CONNECTIONS_A', 1), ]; diff --git a/misc/update/tmux/bin/update_groups.php b/misc/update/tmux/bin/update_groups.php index 3ef6b80de..3d99bd266 100644 --- a/misc/update/tmux/bin/update_groups.php +++ b/misc/update/tmux/bin/update_groups.php @@ -52,4 +52,3 @@ try { } catch (ErrorException $e) { echo $e->getMessage(); } -