Add github action

This commit is contained in:
RainLoop Team 2021-01-16 17:51:14 +03:00
parent 1979f84dab
commit 20e0c1417d
17 changed files with 2038 additions and 2040 deletions

View file

@ -2249,21 +2249,6 @@ END;
$aCache = \explode(',', $sDisableFunctions);
$aCache = \is_array($aCache) && 0 < \count($aCache) ? $aCache : array();
if (\extension_loaded('suhosin'))
{
$sSuhosin = @\ini_get('suhosin.executor.func.blacklist');
$sSuhosin = \is_string($sSuhosin) && 0 < \strlen($sSuhosin) ? $sSuhosin : '';
$aSuhosinCache = \explode(',', $sSuhosin);
$aSuhosinCache = \is_array($aSuhosinCache) && 0 < \count($aSuhosinCache) ? $aSuhosinCache : array();
if (0 < \count($aSuhosinCache))
{
$aCache = \array_merge($aCache, $aSuhosinCache);
$aCache = \array_unique($aCache);
}
}
}
return !\in_array($mFunctionNameOrNames, $aCache);

View file

@ -27,7 +27,7 @@ if (!\defined('MAILSO_LIBRARY_ROOT_PATH'))
include MAILSO_LIBRARY_ROOT_PATH.\str_replace('\\', '/', \substr($sClassName, 7)).'.php' : false;
}
\spl_autoload_register('MailSo\MailSoSplAutoloadRegisterFunction', false);
\spl_autoload_register('MailSo\MailSoSplAutoloadRegisterFunction');
if (\class_exists('MailSo\Base\Loader'))
{

View file

@ -493,15 +493,20 @@ class Message
/**
* @param string $sContentType
* @param string|resource $mData
* @param string $sData
* @param string $sContentTransferEncoding = ''
* @param array $aCustomContentTypeParams = array()
*
* @return \MailSo\Mime\Message
*/
public function AddAlternative($sContentType, $mData, $sContentTransferEncoding = '', $aCustomContentTypeParams = array())
public function AddAlternative($sContentType, $sData, $sContentTransferEncoding = '')
{
$this->aAlternativeParts[] = array($sContentType, $mData, $sContentTransferEncoding, $aCustomContentTypeParams);
$this->aAlternativeParts[] = array(
$sContentType,
\preg_replace('/\\r?\\n/', Enumerations\Constants::CRLF, \trim($sData)),
$sContentTransferEncoding,
array()
);
return $this;
}
@ -712,7 +717,7 @@ class Message
private function createNewMessageSimpleOrAlternativeBody()
{
$oResultPart = null;
if (1 < count($this->aAlternativeParts))
if (1 < \count($this->aAlternativeParts))
{
$oResultPart = Part::NewInstance();
@ -739,7 +744,7 @@ class Message
}
}
else if (1 === count($this->aAlternativeParts))
else if (1 === \count($this->aAlternativeParts))
{
$oAlternativePart = $this->createNewMessageAlternativePartBody($this->aAlternativeParts[0]);
if ($oAlternativePart)
@ -759,7 +764,7 @@ class Message
else
{
$aAttachments = $this->oAttachmentCollection->CloneAsArray();
if (\is_array($aAttachments) && 1 === count($aAttachments) && isset($aAttachments[0]))
if (\is_array($aAttachments) && 1 === \count($aAttachments) && isset($aAttachments[0]))
{
$this->oAttachmentCollection->Clear();
@ -784,7 +789,7 @@ class Message
$oResultPart = null;
$aAttachments = $this->oAttachmentCollection->LinkedAttachments();
if (0 < count($aAttachments))
if (0 < \count($aAttachments))
{
$oResultPart = Part::NewInstance();
@ -824,7 +829,7 @@ class Message
$oResultPart = null;
$aAttachments = $this->oAttachmentCollection->UnlinkedAttachments();
if (0 < count($aAttachments))
if (0 < \count($aAttachments))
{
$oResultPart = Part::NewInstance();