From 55d7d52e354a002a1faa7c5c16ff80ef758a80d7 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 12 Aug 2024 17:07:44 +0200 Subject: [PATCH] Use PHP_SAPI --- snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php | 2 +- snappymail/v/0.0.0/imapsync.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index 587bfc573..a9013c2c1 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -140,7 +140,7 @@ class Actions . $oHttp->GetClientIp($this->oConfig->Get('labs', 'http_client_ip_check_proxy', false)) . '][PID:' . (\MailSo\Base\Utils::FunctionCallable('getmypid') ? \getmypid() : 'unknown') . '][' . \MailSo\Base\Http::GetServer('SERVER_SOFTWARE', '~') - . '][' . (\MailSo\Base\Utils::FunctionCallable('php_sapi_name') ? \php_sapi_name() : '~') + . '][' . \PHP_SAPI . '][Streams:' . \implode(',', \stream_get_transports()) . '][' . $oHttp->GetMethod() . ' ' . $oHttp->GetScheme() . '://' . $oHttp->GetHost(false) . \MailSo\Base\Http::GetServer('REQUEST_URI', '') . ']' ); diff --git a/snappymail/v/0.0.0/imapsync.php b/snappymail/v/0.0.0/imapsync.php index e7beb1178..47cc8dd60 100755 --- a/snappymail/v/0.0.0/imapsync.php +++ b/snappymail/v/0.0.0/imapsync.php @@ -13,7 +13,7 @@ imapsync.php \ use MailSo\Net\Enumerations\ConnectionSecurityType as SecurityType; -if (4 > \count($_SERVER['argv']) || \in_array('--help', $_SERVER['argv'])) { +if ('cli' !== PHP_SAPI || 4 > \count($_SERVER['argv']) || \in_array('--help', $_SERVER['argv'])) { echo 'OPTIONS usage: imapsync.php [options]