mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Pre release fixes and improvements
This commit is contained in:
parent
67c5e31e58
commit
abddb3d828
61 changed files with 378 additions and 57 deletions
|
|
@ -132,7 +132,7 @@ class Domain extends \RainLoop\Providers\AbstractProvider
|
|||
$bUseSieve = '1' === (string) $oActions->GetActionParam('UseSieve', '0');
|
||||
$bSieveAllowRaw = '1' === (string) $oActions->GetActionParam('SieveAllowRaw', '0');
|
||||
$sSieveHost = (string) $oActions->GetActionParam('SieveHost', '');
|
||||
$iSievePort = (int) $oActions->GetActionParam('SievePort', 2000);
|
||||
$iSievePort = (int) $oActions->GetActionParam('SievePort', 4190);
|
||||
$iSieveSecure = (int) $oActions->GetActionParam('SieveSecure', \MailSo\Net\Enumerations\ConnectionSecurityType::NONE);
|
||||
$sOutHost = (string) $oActions->GetActionParam('OutHost', '');
|
||||
$iOutPort = (int) $oActions->GetActionParam('OutPort', 25);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ class Filter
|
|||
*/
|
||||
private $sActionValueSecond;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $sActionValueThird;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
|
|
@ -59,6 +64,11 @@ class Filter
|
|||
*/
|
||||
private $bKeep;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $bStop;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->Clear();
|
||||
|
|
@ -78,10 +88,11 @@ class Filter
|
|||
$this->sActionType = \RainLoop\Providers\Filters\Enumerations\ActionType::MOVE_TO;
|
||||
$this->sActionValue = '';
|
||||
$this->sActionValueSecond = '';
|
||||
$this->sActionValueThird = '';
|
||||
|
||||
$this->bMarkAsRead = false;
|
||||
$this->bSkipOthers = false;
|
||||
$this->bKeep = true;
|
||||
$this->bStop = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -148,6 +159,14 @@ class Filter
|
|||
return $this->sActionValueSecond;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function ActionValueThird()
|
||||
{
|
||||
return $this->sActionValueThird;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -159,9 +178,9 @@ class Filter
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function SkipOthers()
|
||||
public function Stop()
|
||||
{
|
||||
return $this->bSkipOthers;
|
||||
return $this->bStop;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -216,10 +235,11 @@ class Filter
|
|||
|
||||
$this->sActionValue = isset($aFilter['ActionValue']) ? $aFilter['ActionValue'] : '';
|
||||
$this->sActionValueSecond = isset($aFilter['ActionValueSecond']) ? $aFilter['ActionValueSecond'] : '';
|
||||
$this->sActionValueThird = isset($aFilter['ActionValueThird']) ? $aFilter['ActionValueThird'] : '';
|
||||
|
||||
$this->bKeep = isset($aFilter['Keep']) ? '1' === (string) $aFilter['Keep'] : true;
|
||||
$this->bStop = isset($aFilter['Stop']) ? '1' === (string) $aFilter['Stop'] : true;
|
||||
$this->bMarkAsRead = isset($aFilter['MarkAsRead']) ? '1' === (string) $aFilter['MarkAsRead'] : false;
|
||||
$this->bSkipOthers = isset($aFilter['SkipOthers']) ? '1' === (string) $aFilter['SkipOthers'] : false;
|
||||
|
||||
$this->aConditions = \RainLoop\Providers\Filters\Classes\FilterCondition::CollectionFromJSON(
|
||||
isset($aFilter['Conditions']) ? $aFilter['Conditions'] : array());
|
||||
|
|
@ -255,9 +275,10 @@ class Filter
|
|||
'ActionType' => $this->ActionType(),
|
||||
'ActionValue' => $this->ActionValue(),
|
||||
'ActionValueSecond' => $this->ActionValueSecond(),
|
||||
'ActionValueThird' => $this->ActionValueThird(),
|
||||
'Keep' => $this->Keep(),
|
||||
'MarkAsRead' => $this->MarkAsRead(),
|
||||
'SkipOthers' => $this->SkipOthers()
|
||||
'Stop' => $this->Stop(),
|
||||
'MarkAsRead' => $this->MarkAsRead()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
{
|
||||
const NEW_LINE = "\r\n";
|
||||
|
||||
const SIEVE_FILE_NAME = 'rainloop.sieve.user';
|
||||
const SIEVE_FILE_NAME_RAW = 'rainloop.sieve.raw';
|
||||
const SIEVE_FILE_NAME = 'rainloop.user';
|
||||
const SIEVE_FILE_NAME_RAW = 'rainloop.user.raw';
|
||||
|
||||
/**
|
||||
* @var \MailSo\Log\Logger
|
||||
|
|
@ -317,10 +317,12 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
case \RainLoop\Providers\Filters\Enumerations\ActionType::VACATION:
|
||||
$sValue = \trim($oFilter->ActionValue());
|
||||
$sValueSecond = \trim($oFilter->ActionValueSecond());
|
||||
$sValueThird = \trim($oFilter->ActionValueThird());
|
||||
if (0 < \strlen($sValue))
|
||||
{
|
||||
$aCapa['vacation'] = true;
|
||||
|
||||
$iDays = 1;
|
||||
$sSubject = '';
|
||||
if (0 < \strlen($sValueSecond))
|
||||
{
|
||||
|
|
@ -328,8 +330,17 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
\preg_replace('/[\s]+/u', ' ', $sValueSecond)).'" ';
|
||||
}
|
||||
|
||||
$aResult[] = $sTab.'vacation :days 1 '.$sSubject.'"'.$this->quote($sValue).'";';
|
||||
$aResult[] = $sTab.'stop;';
|
||||
if (0 < \strlen($sValueThird) && \is_numeric($sValueThird) && 1 < (int) $sValueThird)
|
||||
{
|
||||
$iDays = (int) $sValueThird;
|
||||
}
|
||||
|
||||
$aResult[] = $sTab.'vacation :days '.$iDays.' '.$sSubject.'"'.$this->quote($sValue).'";';
|
||||
|
||||
if ($oFilter->Stop())
|
||||
{
|
||||
$aResult[] = $sTab.'stop;';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue