mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
No need for !!
This commit is contained in:
parent
e434d51157
commit
813bed72ad
9 changed files with 12 additions and 14 deletions
|
|
@ -346,7 +346,7 @@ class Http
|
||||||
CURLOPT_FAILONERROR => true,
|
CURLOPT_FAILONERROR => true,
|
||||||
CURLOPT_SSL_VERIFYPEER => false,
|
CURLOPT_SSL_VERIFYPEER => false,
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
CURLOPT_FOLLOWLOCATION => !!$bFollowLocation,
|
CURLOPT_FOLLOWLOCATION => $bFollowLocation,
|
||||||
CURLOPT_MAXREDIRS => 7,
|
CURLOPT_MAXREDIRS => 7,
|
||||||
CURLOPT_FILE => $rFile,
|
CURLOPT_FILE => $rFile,
|
||||||
CURLOPT_TIMEOUT => (int) $iTimeout
|
CURLOPT_TIMEOUT => (int) $iTimeout
|
||||||
|
|
|
||||||
|
|
@ -140,13 +140,13 @@ abstract class Driver
|
||||||
|
|
||||||
public function WriteOnErrorOnly(bool $bValue) : self
|
public function WriteOnErrorOnly(bool $bValue) : self
|
||||||
{
|
{
|
||||||
$this->bWriteOnErrorOnly = !!$bValue;
|
$this->bWriteOnErrorOnly = $bValue;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function WriteOnPhpErrorOnly(bool $bValue) : self
|
public function WriteOnPhpErrorOnly(bool $bValue) : self
|
||||||
{
|
{
|
||||||
$this->bWriteOnPhpErrorOnly = !!$bValue;
|
$this->bWriteOnPhpErrorOnly = $bValue;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,14 +167,12 @@ abstract class NetClient
|
||||||
$this->writeLog('Start connection to "'.$this->sConnectedHost.':'.$this->iConnectedPort.'"',
|
$this->writeLog('Start connection to "'.$this->sConnectedHost.':'.$this->iConnectedPort.'"',
|
||||||
\MailSo\Log\Enumerations\Type::NOTE);
|
\MailSo\Log\Enumerations\Type::NOTE);
|
||||||
|
|
||||||
$bVerifySsl = !!$bVerifySsl;
|
|
||||||
$bAllowSelfSigned = $bVerifySsl ? !!$bAllowSelfSigned : true;
|
|
||||||
$aStreamContextSettings = array(
|
$aStreamContextSettings = array(
|
||||||
'ssl' => array(
|
'ssl' => array(
|
||||||
'verify_host' => $bVerifySsl,
|
'verify_host' => $bVerifySsl,
|
||||||
'verify_peer' => $bVerifySsl,
|
'verify_peer' => $bVerifySsl,
|
||||||
'verify_peer_name' => $bVerifySsl,
|
'verify_peer_name' => $bVerifySsl,
|
||||||
'allow_self_signed' => $bAllowSelfSigned
|
'allow_self_signed' => $bVerifySsl ? $bAllowSelfSigned : true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ class Actions
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->oLogger = \MailSo\Log\Logger::SingletonInstance();
|
$this->oLogger = \MailSo\Log\Logger::SingletonInstance();
|
||||||
if (!!$this->oConfig->Get('logs', 'enable', false)) {
|
if ($this->oConfig->Get('logs', 'enable', false)) {
|
||||||
$sSessionFilter = (string)$this->oConfig->Get('logs', 'session_filter', '');
|
$sSessionFilter = (string)$this->oConfig->Get('logs', 'session_filter', '');
|
||||||
if (!empty($sSessionFilter)) {
|
if (!empty($sSessionFilter)) {
|
||||||
$aSessionParts = \explode(':', $sSessionFilter, 2);
|
$aSessionParts = \explode(':', $sSessionFilter, 2);
|
||||||
|
|
@ -633,7 +633,7 @@ class Actions
|
||||||
if (null === $this->oLoggerAuth) {
|
if (null === $this->oLoggerAuth) {
|
||||||
$this->oLoggerAuth = new \MailSo\Log\Logger(false);
|
$this->oLoggerAuth = new \MailSo\Log\Logger(false);
|
||||||
|
|
||||||
if (!!$this->oConfig->Get('logs', 'auth_logging', false)) {
|
if ($this->oConfig->Get('logs', 'auth_logging', false)) {
|
||||||
$sAuthLogFileFullPath = \APP_PRIVATE_DATA . 'logs/' . $this->compileLogFileName(
|
$sAuthLogFileFullPath = \APP_PRIVATE_DATA . 'logs/' . $this->compileLogFileName(
|
||||||
$this->oConfig->Get('logs', 'auth_logging_filename', ''));
|
$this->oConfig->Get('logs', 'auth_logging_filename', ''));
|
||||||
|
|
||||||
|
|
@ -963,7 +963,7 @@ class Actions
|
||||||
$aResult['PluginsLink'] = './?/Plugins/0/' . ($bAdmin ? 'Admin' : 'User') . '/' . $sStaticCache . '/';
|
$aResult['PluginsLink'] = './?/Plugins/0/' . ($bAdmin ? 'Admin' : 'User') . '/' . $sStaticCache . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
$bAppJsDebug = !!$this->oConfig->Get('labs', 'use_app_debug_js', false);
|
$bAppJsDebug = $this->oConfig->Get('labs', 'use_app_debug_js', false);
|
||||||
|
|
||||||
$aResult['StaticLibJsLink'] = $this->StaticPath('js/' . ($bAppJsDebug ? '' : 'min/') .
|
$aResult['StaticLibJsLink'] = $this->StaticPath('js/' . ($bAppJsDebug ? '' : 'min/') .
|
||||||
'libs' . ($bAppJsDebug ? '' : '.min') . '.js');
|
'libs' . ($bAppJsDebug ? '' : '.min') . '.js');
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ trait Response
|
||||||
|
|
||||||
$oAccount = $this->getAccountFromToken();
|
$oAccount = $this->getAccountFromToken();
|
||||||
|
|
||||||
if (!$mResult['DateTimeStampInUTC'] || !!$this->Config()->Get('labs', 'date_from_headers', false)) {
|
if (!$mResult['DateTimeStampInUTC'] || $this->Config()->Get('labs', 'date_from_headers', false)) {
|
||||||
$iDateTimeStampInUTC = $mResponse->HeaderTimeStampInUTC();
|
$iDateTimeStampInUTC = $mResponse->HeaderTimeStampInUTC();
|
||||||
if ($iDateTimeStampInUTC) {
|
if ($iDateTimeStampInUTC) {
|
||||||
$mResult['DateTimeStampInUTC'] = $iDateTimeStampInUTC;
|
$mResult['DateTimeStampInUTC'] = $iDateTimeStampInUTC;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ trait UserAuth
|
||||||
if (false === \strpos($sEmail, '@')) {
|
if (false === \strpos($sEmail, '@')) {
|
||||||
$this->Logger()->Write('The email address "' . $sEmail . '" is not complete', \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
|
$this->Logger()->Write('The email address "' . $sEmail . '" is not complete', \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
|
||||||
|
|
||||||
if (false === \strpos($sEmail, '@') && !!$this->Config()->Get('login', 'determine_user_domain', false)) {
|
if (false === \strpos($sEmail, '@') && $this->Config()->Get('login', 'determine_user_domain', false)) {
|
||||||
$sUserHost = \trim($this->Http()->GetHost(false, true, true));
|
$sUserHost = \trim($this->Http()->GetHost(false, true, true));
|
||||||
$this->Logger()->Write('Determined user domain: ' . $sUserHost, \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
|
$this->Logger()->Write('Determined user domain: ' . $sUserHost, \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ class Identity implements \JsonSerializable
|
||||||
$this->sBcc = !empty($aData['Bcc']) ? $aData['Bcc'] : '';
|
$this->sBcc = !empty($aData['Bcc']) ? $aData['Bcc'] : '';
|
||||||
$this->sSignature = !empty($aData['Signature']) ? $aData['Signature'] : '';
|
$this->sSignature = !empty($aData['Signature']) ? $aData['Signature'] : '';
|
||||||
$this->bSignatureInsertBefore = isset($aData['SignatureInsertBefore']) ?
|
$this->bSignatureInsertBefore = isset($aData['SignatureInsertBefore']) ?
|
||||||
($bJson ? '1' === $aData['SignatureInsertBefore'] : !!$aData['SignatureInsertBefore']) : true;
|
!empty($aData['SignatureInsertBefore']) : true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ class Manager
|
||||||
{
|
{
|
||||||
if ($this->bIsEnabled && isset($aAppData['Plugins']) && \is_array($aAppData['Plugins']))
|
if ($this->bIsEnabled && isset($aAppData['Plugins']) && \is_array($aAppData['Plugins']))
|
||||||
{
|
{
|
||||||
$bAuth = isset($aAppData['Auth']) && !!$aAppData['Auth'];
|
$bAuth = !empty($aAppData['Auth']);
|
||||||
foreach ($this->aPlugins as $oPlugin)
|
foreach ($this->aPlugins as $oPlugin)
|
||||||
{
|
{
|
||||||
if ($oPlugin)
|
if ($oPlugin)
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class Property
|
||||||
|
|
||||||
public function SetAllowedInJs(bool $bValue = true) : self
|
public function SetAllowedInJs(bool $bValue = true) : self
|
||||||
{
|
{
|
||||||
$this->bAllowedInJs = !!$bValue;
|
$this->bAllowedInJs = $bValue;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue