mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-05 04:32:20 +03:00
small fixes
This commit is contained in:
parent
0f856b421c
commit
ca84bbb807
7 changed files with 41 additions and 8 deletions
|
|
@ -7,6 +7,7 @@ function MessageModel()
|
|||
{
|
||||
this.folderFullNameRaw = '';
|
||||
this.uid = '';
|
||||
this.hash = '';
|
||||
this.requestHash = '';
|
||||
this.subject = ko.observable('');
|
||||
this.size = ko.observable(0);
|
||||
|
|
@ -221,6 +222,7 @@ MessageModel.prototype.clear = function ()
|
|||
{
|
||||
this.folderFullNameRaw = '';
|
||||
this.uid = '';
|
||||
this.hash = '';
|
||||
this.requestHash = '';
|
||||
this.subject('');
|
||||
this.size(0);
|
||||
|
|
@ -302,6 +304,7 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
|
|||
{
|
||||
this.folderFullNameRaw = oJsonMessage.Folder;
|
||||
this.uid = oJsonMessage.Uid;
|
||||
this.hash = oJsonMessage.Hash;
|
||||
this.requestHash = oJsonMessage.RequestHash;
|
||||
|
||||
this.size(Utils.pInt(oJsonMessage.Size));
|
||||
|
|
@ -788,6 +791,7 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
|
|||
{
|
||||
this.folderFullNameRaw = oMessage.folderFullNameRaw;
|
||||
this.uid = oMessage.uid;
|
||||
this.hash = oMessage.hash;
|
||||
this.requestHash = oMessage.requestHash;
|
||||
this.subject(oMessage.subject());
|
||||
this.size(oMessage.size());
|
||||
|
|
|
|||
|
|
@ -744,7 +744,7 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
|||
oMessagesBodiesDom = oMessagesBodiesDom && oMessagesBodiesDom[0] ? oMessagesBodiesDom : null;
|
||||
if (oMessagesBodiesDom)
|
||||
{
|
||||
sId = 'rl-' + oMessage.requestHash.replace(/[^a-zA-Z0-9]/g, '');
|
||||
sId = 'rl-mgs-' + oMessage.hash.replace(/[^a-zA-Z0-9]/g, '');
|
||||
oTextBody = oMessagesBodiesDom.find('#' + sId);
|
||||
if (!oTextBody || !oTextBody[0])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -481,7 +481,9 @@ MailBoxMessageListViewModel.prototype.onMessageResponse = function (sResult, oDa
|
|||
{
|
||||
var oRainLoopData = RL.data();
|
||||
|
||||
oRainLoopData.hideMessageBodies();
|
||||
oRainLoopData.messageLoading(false);
|
||||
|
||||
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||
{
|
||||
oRainLoopData.setMessage(oData, bCached);
|
||||
|
|
|
|||
|
|
@ -6343,6 +6343,7 @@ class Actions
|
|||
}
|
||||
|
||||
$sSubject = $mResult['Subject'];
|
||||
$mResult['Hash'] = \md5($mResult['Folder'].$mResult['Uid']);
|
||||
$mResult['RequestHash'] = \RainLoop\Utils::EncodeKeyValues(array(
|
||||
'V' => APP_VERSION,
|
||||
'Account' => $oAccount ? \md5($oAccount->Hash()) : '',
|
||||
|
|
@ -6414,6 +6415,8 @@ class Actions
|
|||
$mResult['Plain'] = 0 === \strlen($sPlain) ? '' : \MailSo\Base\HtmlUtils::ConvertPlainToHtml($sPlain);
|
||||
$mResult['Rtl'] = $bRtl;
|
||||
|
||||
$mResult['TextHash'] = \md5($mResult['Html'].$mResult['Plain'].$mResult['PlainRaw']);
|
||||
|
||||
$mResult['PgpSigned'] = $mResponse->PgpSigned();
|
||||
$mResult['PgpEncrypted'] = $mResponse->PgpEncrypted();
|
||||
$mResult['PgpSignature'] = $mResponse->PgpSignature();
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ class Domain
|
|||
{
|
||||
$oDomain = null;
|
||||
|
||||
if (0 < strlen($sName) && is_array($aDomain) && !empty($aDomain['imap_host']) && !empty($aDomain['imap_port']) &&
|
||||
!empty($aDomain['smpt_host']) && !empty($aDomain['smpt_port']))
|
||||
if (0 < \strlen($sName) && \is_array($aDomain) && 0 < \strlen($aDomain['imap_host']) && 0 < \strlen($aDomain['imap_port']) &&
|
||||
0 < \strlen($aDomain['smpt_host']) && 0 < \strlen($aDomain['smpt_port']))
|
||||
{
|
||||
$sIncHost = (string) $aDomain['imap_host'];
|
||||
$iIncPort = (int) $aDomain['imap_port'];
|
||||
|
|
@ -179,11 +179,29 @@ class Domain
|
|||
$this->bDisabled = (bool) $bDisabled;
|
||||
}
|
||||
|
||||
public function Normalize()
|
||||
{
|
||||
$this->sIncHost = \trim($this->sIncHost);
|
||||
$this->sOutHost = \trim($this->sOutHost);
|
||||
$this->sWhiteList = \trim($this->sWhiteList);
|
||||
|
||||
if ($this->iIncPort <= 0)
|
||||
{
|
||||
$this->iIncPort = 143;
|
||||
}
|
||||
|
||||
if ($this->iOutPort <= 0)
|
||||
{
|
||||
$this->iOutPort = 25;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function ToIniString()
|
||||
{
|
||||
$this->Normalize();
|
||||
return implode("\n", array(
|
||||
'imap_host = "'.$this->encodeIniString($this->sIncHost).'"',
|
||||
'imap_port = '.$this->iIncPort,
|
||||
|
|
|
|||
|
|
@ -5871,6 +5871,7 @@ function MessageModel()
|
|||
{
|
||||
this.folderFullNameRaw = '';
|
||||
this.uid = '';
|
||||
this.hash = '';
|
||||
this.requestHash = '';
|
||||
this.subject = ko.observable('');
|
||||
this.size = ko.observable(0);
|
||||
|
|
@ -6085,6 +6086,7 @@ MessageModel.prototype.clear = function ()
|
|||
{
|
||||
this.folderFullNameRaw = '';
|
||||
this.uid = '';
|
||||
this.hash = '';
|
||||
this.requestHash = '';
|
||||
this.subject('');
|
||||
this.size(0);
|
||||
|
|
@ -6166,6 +6168,7 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
|
|||
{
|
||||
this.folderFullNameRaw = oJsonMessage.Folder;
|
||||
this.uid = oJsonMessage.Uid;
|
||||
this.hash = oJsonMessage.Hash;
|
||||
this.requestHash = oJsonMessage.RequestHash;
|
||||
|
||||
this.size(Utils.pInt(oJsonMessage.Size));
|
||||
|
|
@ -6652,6 +6655,7 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
|
|||
{
|
||||
this.folderFullNameRaw = oMessage.folderFullNameRaw;
|
||||
this.uid = oMessage.uid;
|
||||
this.hash = oMessage.hash;
|
||||
this.requestHash = oMessage.requestHash;
|
||||
this.subject(oMessage.subject());
|
||||
this.size(oMessage.size());
|
||||
|
|
@ -11370,7 +11374,9 @@ MailBoxMessageListViewModel.prototype.onMessageResponse = function (sResult, oDa
|
|||
{
|
||||
var oRainLoopData = RL.data();
|
||||
|
||||
oRainLoopData.hideMessageBodies();
|
||||
oRainLoopData.messageLoading(false);
|
||||
|
||||
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||
{
|
||||
oRainLoopData.setMessage(oData, bCached);
|
||||
|
|
@ -14146,7 +14152,7 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
|||
oMessagesBodiesDom = oMessagesBodiesDom && oMessagesBodiesDom[0] ? oMessagesBodiesDom : null;
|
||||
if (oMessagesBodiesDom)
|
||||
{
|
||||
sId = 'rl-' + oMessage.requestHash.replace(/[^a-zA-Z0-9]/g, '');
|
||||
sId = 'rl-mgs-' + oMessage.hash.replace(/[^a-zA-Z0-9]/g, '');
|
||||
oTextBody = oMessagesBodiesDom.find('#' + sId);
|
||||
if (!oTextBody || !oTextBody[0])
|
||||
{
|
||||
|
|
|
|||
8
rainloop/v/0.0.0/static/js/app.min.js
vendored
8
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue