mailto links fixes

Filters interface fixes
DKIM status a new message
This commit is contained in:
RainLoop Team 2015-01-31 23:00:10 +04:00
parent 0152f1583b
commit 0735071f1c
18 changed files with 212 additions and 113 deletions

View file

@ -6,8 +6,8 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
{
const NEW_LINE = "\r\n";
const SIEVE_FILE_NAME = 'rainloop.user';
const SIEVE_FILE_NAME_RAW = 'rainloop.raw';
const SIEVE_FILE_NAME = 'rainloop.sieve.user';
const SIEVE_FILE_NAME_RAW = 'rainloop.sieve.raw';
/**
* @var \MailSo\Log\Logger
@ -98,7 +98,7 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
'moveto' => \in_array('fileinto', $aModules),
'reject' => \in_array('reject', $aModules),
'vacation' => \in_array('vacation', $aModules),
'markasread' => \in_array('imap4flags', $aModules) && false
'markasread' => \in_array('imap4flags', $aModules)
)
);
}
@ -119,33 +119,31 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
{
$aList = $oSieveClient->ListScripts();
$sUserFilter = $this->collectionToFileString($aFilters);
if (!empty($sUserFilter))
if ($bRawIsActive)
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME, $sUserFilter);
if (!$bRawIsActive)
{
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME);
}
}
else if (isset($aList[self::SIEVE_FILE_NAME]))
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME);
}
$sRaw = \trim($sRaw);
if (!empty($sRaw))
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME_RAW, $sRaw);
if ($bRawIsActive)
if (!empty($sRaw))
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME_RAW, $sRaw);
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME_RAW);
}
else if (isset($aList[self::SIEVE_FILE_NAME_RAW]))
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME_RAW);
}
}
else if (isset($aList[self::SIEVE_FILE_NAME_RAW]))
else
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME_RAW);
$sUserFilter = $this->collectionToFileString($aFilters);
if (!empty($sUserFilter))
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME, $sUserFilter);
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME);
}
else if (isset($aList[self::SIEVE_FILE_NAME]))
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME);
}
}
$oSieveClient->LogoutAndDisconnect();

View file

@ -2,14 +2,14 @@
namespace RainLoop\Providers\TwoFactorAuth;
class GoogleTwoFactorAuth
class GoogleTwoFactorAuth
extends \RainLoop\Providers\TwoFactorAuth\AbstractTwoFactorAuth
implements \RainLoop\Providers\TwoFactorAuth\TwoFactorAuthInterface
{
/**
* @param string $sSecret
* @param string $sCode
*
*
* @return bool
*/
public function VerifyCode($sSecret, $sCode)
@ -17,7 +17,7 @@ class GoogleTwoFactorAuth
include_once APP_VERSION_ROOT_PATH.'app/libraries/PHPGangsta/GoogleAuthenticator.php';
$oGoogleAuthenticator = new \PHPGangsta_GoogleAuthenticator();
return $oGoogleAuthenticator->verifyCode($sSecret, $sCode);
return $oGoogleAuthenticator->verifyCode($sSecret, $sCode, 8);
}
/**