mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-11-02 09:35:34 +08:00
Weekly fixes
This commit is contained in:
parent
053fd1c60b
commit
f1b3271b4d
16 changed files with 210 additions and 93 deletions
|
|
@ -1042,6 +1042,7 @@
|
||||||
oData.Result.IsThreadsSupported && true);
|
oData.Result.IsThreadsSupported && true);
|
||||||
|
|
||||||
FolderStore.folderList(this.folderResponseParseRec(FolderStore.namespace, oData.Result['@Collection']));
|
FolderStore.folderList(this.folderResponseParseRec(FolderStore.namespace, oData.Result['@Collection']));
|
||||||
|
FolderStore.folderList.optimized(!!oData.Result.Optimized);
|
||||||
|
|
||||||
if (oData.Result['SystemFolders'] && '' === '' +
|
if (oData.Result['SystemFolders'] && '' === '' +
|
||||||
Settings.settingsGet('SentFolder') +
|
Settings.settingsGet('SentFolder') +
|
||||||
|
|
|
||||||
|
|
@ -687,7 +687,7 @@
|
||||||
|
|
||||||
if (oEvent)
|
if (oEvent)
|
||||||
{
|
{
|
||||||
if (oEvent.shiftKey && !oEvent.ctrlKey && !oEvent.altKey)
|
if (oEvent.shiftKey && !(oEvent.ctrlKey || oEvent.metaKey) && !oEvent.altKey)
|
||||||
{
|
{
|
||||||
bClick = false;
|
bClick = false;
|
||||||
if ('' === this.sLastUid)
|
if ('' === this.sLastUid)
|
||||||
|
|
@ -700,7 +700,7 @@
|
||||||
|
|
||||||
this.focusedItem(oItem);
|
this.focusedItem(oItem);
|
||||||
}
|
}
|
||||||
else if (oEvent.ctrlKey && !oEvent.shiftKey && !oEvent.altKey)
|
else if ((oEvent.ctrlKey || oEvent.metaKey) && !oEvent.shiftKey && !oEvent.altKey)
|
||||||
{
|
{
|
||||||
bClick = false;
|
bClick = false;
|
||||||
this.focusedItem(oItem);
|
this.focusedItem(oItem);
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,12 @@
|
||||||
|
|
||||||
this.progressText = ko.computed(function () {
|
this.progressText = ko.computed(function () {
|
||||||
var iP = this.progress();
|
var iP = this.progress();
|
||||||
return 0 === iP ? '' : '' + (99 === iP ? 100 : iP) + '%';
|
return 0 === iP ? '' : '' + (98 < iP ? 100 : iP) + '%';
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.progressStyle = ko.computed(function () {
|
this.progressStyle = ko.computed(function () {
|
||||||
var iP = this.progress();
|
var iP = this.progress();
|
||||||
return 0 === iP ? '' : 'width:' + (99 === iP ? 100 : iP) + '%';
|
return 0 === iP ? '' : 'width:' + (98 < iP ? 100 : iP) + '%';
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.title = ko.computed(function () {
|
this.title = ko.computed(function () {
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@
|
||||||
this.passwordError = ko.observable(false);
|
this.passwordError = ko.observable(false);
|
||||||
|
|
||||||
this.emailFocus = ko.observable(false);
|
this.emailFocus = ko.observable(false);
|
||||||
|
this.passwordFocus = ko.observable(false);
|
||||||
this.submitFocus = ko.observable(false);
|
this.submitFocus = ko.observable(false);
|
||||||
|
|
||||||
this.email.subscribe(function () {
|
this.email.subscribe(function () {
|
||||||
|
|
@ -297,12 +298,22 @@
|
||||||
LoginUserView.prototype.onShow = function ()
|
LoginUserView.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
kn.routeOff();
|
kn.routeOff();
|
||||||
|
};
|
||||||
|
|
||||||
_.delay(_.bind(function () {
|
LoginUserView.prototype.onShowWithDelay = function ()
|
||||||
|
{
|
||||||
if ('' !== this.email() && '' !== this.password())
|
if ('' !== this.email() && '' !== this.password())
|
||||||
{
|
{
|
||||||
this.submitFocus(true);
|
this.submitFocus(true);
|
||||||
}
|
}
|
||||||
|
else if ('' === this.email())
|
||||||
|
{
|
||||||
|
this.emailFocus(true);
|
||||||
|
}
|
||||||
|
else if ('' === this.password())
|
||||||
|
{
|
||||||
|
this.passwordFocus(true);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.emailFocus(true);
|
this.emailFocus(true);
|
||||||
|
|
@ -312,14 +323,13 @@
|
||||||
{
|
{
|
||||||
$.cookie('rllang', LanguageStore.language(), {'expires': 30});
|
$.cookie('rllang', LanguageStore.language(), {'expires': 30});
|
||||||
}
|
}
|
||||||
|
|
||||||
}, this), 100);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
LoginUserView.prototype.onHide = function ()
|
LoginUserView.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
this.submitFocus(false);
|
this.submitFocus(false);
|
||||||
this.emailFocus(false);
|
this.emailFocus(false);
|
||||||
|
this.passwordFocus(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
LoginUserView.prototype.onBuild = function ()
|
LoginUserView.prototype.onBuild = function ()
|
||||||
|
|
|
||||||
|
|
@ -279,8 +279,8 @@
|
||||||
this.viewIsImportant(oMessage.isImportant());
|
this.viewIsImportant(oMessage.isImportant());
|
||||||
|
|
||||||
sLastEmail = oMessage.fromAsSingleEmail();
|
sLastEmail = oMessage.fromAsSingleEmail();
|
||||||
Cache.getUserPic(sLastEmail, function (sPic, $sEmail) {
|
Cache.getUserPic(sLastEmail, function (sPic, sEmail) {
|
||||||
if (sPic !== self.viewUserPic() && sLastEmail === $sEmail)
|
if (sPic !== self.viewUserPic() && sLastEmail === sEmail)
|
||||||
{
|
{
|
||||||
self.viewUserPicVisible(false);
|
self.viewUserPicVisible(false);
|
||||||
self.viewUserPic(Consts.DataImages.UserDotPic);
|
self.viewUserPic(Consts.DataImages.UserDotPic);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "1.8.1",
|
"version": "1.8.1",
|
||||||
"release": "276",
|
"release": "281",
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
|
|
|
||||||
|
|
@ -280,20 +280,37 @@ class Http
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param bool $bCheckProxy = true
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function GetScheme()
|
public function GetScheme($bCheckProxy = true)
|
||||||
{
|
{
|
||||||
$sHttps = \strtolower($this->GetServer('HTTPS', ''));
|
return $this->IsSecure($bCheckProxy) ? 'https' : 'http';
|
||||||
return ('on' === $sHttps || ('' === $sHttps && '443' === (string) $this->GetServer('SERVER_PORT', ''))) ? 'https' : 'http';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param bool $bCheckProxy = true
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function IsSecure()
|
public function IsSecure($bCheckProxy = true)
|
||||||
{
|
{
|
||||||
return ('https' === $this->GetScheme());
|
$sHttps = \strtolower($this->GetServer('HTTPS', ''));
|
||||||
|
if ('on' === $sHttps || ('' === $sHttps && '443' === (string) $this->GetServer('SERVER_PORT', '')))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($bCheckProxy && (
|
||||||
|
('https' === \strtolower($this->GetServer('HTTP_X_FORWARDED_PROTO', ''))) ||
|
||||||
|
('on' === \strtolower($this->GetServer('HTTP_X_FORWARDED_SSL', '')))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -308,12 +325,10 @@ class Http
|
||||||
$sHost = $this->GetServer('HTTP_HOST', '');
|
$sHost = $this->GetServer('HTTP_HOST', '');
|
||||||
if (0 === \strlen($sHost))
|
if (0 === \strlen($sHost))
|
||||||
{
|
{
|
||||||
$sScheme = $this->GetScheme();
|
|
||||||
$sName = $this->GetServer('SERVER_NAME');
|
$sName = $this->GetServer('SERVER_NAME');
|
||||||
$iPort = (int) $this->GetServer('SERVER_PORT');
|
$iPort = (int) $this->GetServer('SERVER_PORT', 80);
|
||||||
|
|
||||||
$sHost = (('http' === $sScheme && 80 === $iPort) || ('https' === $sScheme && 443 === $iPort))
|
$sHost = (\in_array($iPort, array(80, 433))) ? $sName : $sName.':'.$iPort;
|
||||||
? $sName : $sName.':'.$iPort;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($bWithoutWWW)
|
if ($bWithoutWWW)
|
||||||
|
|
|
||||||
|
|
@ -191,4 +191,25 @@ class CacheClient
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $bCache = false
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function Verify($bCache = false)
|
||||||
|
{
|
||||||
|
if ($this->oDriver)
|
||||||
|
{
|
||||||
|
$sCacheData = \gmdate('Y-m-d-H');
|
||||||
|
if ($bCache && $sCacheData === $this->Get('__verify_key__'))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->Set('__verify_key__', $sCacheData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -617,6 +617,9 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
{
|
{
|
||||||
$aReturn = array();
|
$aReturn = array();
|
||||||
|
|
||||||
|
$sDelimiter = '';
|
||||||
|
$bInbox = false;
|
||||||
|
|
||||||
$oImapResponse = null;
|
$oImapResponse = null;
|
||||||
foreach ($aResult as /* @var $oImapResponse \MailSo\Imap\Response */ $oImapResponse)
|
foreach ($aResult as /* @var $oImapResponse \MailSo\Imap\Response */ $oImapResponse)
|
||||||
{
|
{
|
||||||
|
|
@ -628,6 +631,16 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
$oFolder = Folder::NewInstance($oImapResponse->ResponseList[4],
|
$oFolder = Folder::NewInstance($oImapResponse->ResponseList[4],
|
||||||
$oImapResponse->ResponseList[3], $oImapResponse->ResponseList[2]);
|
$oImapResponse->ResponseList[3], $oImapResponse->ResponseList[2]);
|
||||||
|
|
||||||
|
if ($oFolder->IsInbox())
|
||||||
|
{
|
||||||
|
$bInbox = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($sDelimiter))
|
||||||
|
{
|
||||||
|
$sDelimiter = $oFolder->Delimiter();
|
||||||
|
}
|
||||||
|
|
||||||
$aReturn[] = $oFolder;
|
$aReturn[] = $oFolder;
|
||||||
}
|
}
|
||||||
catch (\MailSo\Base\Exceptions\InvalidArgumentException $oException)
|
catch (\MailSo\Base\Exceptions\InvalidArgumentException $oException)
|
||||||
|
|
@ -637,6 +650,11 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$bInbox && !empty($sDelimiter))
|
||||||
|
{
|
||||||
|
$aReturn[] = Folder::NewInstance('INBOX', $sDelimiter);
|
||||||
|
}
|
||||||
|
|
||||||
if ($bUseListStatus)
|
if ($bUseListStatus)
|
||||||
{
|
{
|
||||||
foreach ($aResult as /* @var $oImapResponse \MailSo\Imap\Response */ $oImapResponse)
|
foreach ($aResult as /* @var $oImapResponse \MailSo\Imap\Response */ $oImapResponse)
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,27 @@ class FolderCollection extends \MailSo\Base\Collection
|
||||||
return $this->sNamespace;
|
return $this->sNamespace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function FindDelimiter()
|
||||||
|
{
|
||||||
|
$sDelimiter = '/';
|
||||||
|
|
||||||
|
$oFolder = $this->GetByFullNameRaw('INBOX');
|
||||||
|
if (!$oFolder)
|
||||||
|
{
|
||||||
|
$oFolder = $this->GetByIndex(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($oFolder)
|
||||||
|
{
|
||||||
|
$sDelimiter = $oFolder->Delimiter();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sDelimiter;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sNamespace
|
* @param string $sNamespace
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2038,10 +2038,10 @@ class MailClient
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function folerListOptimization($aMailFoldersHelper, $iOptimizationLimit = 0)
|
public function folderListOptimization($aMailFoldersHelper, $iOptimizationLimit = 0)
|
||||||
{
|
{
|
||||||
// optimization
|
// optimization
|
||||||
if (10 < $iOptimizationLimit && $iOptimizationLimit < \count($aMailFoldersHelper))
|
if (10 < $iOptimizationLimit && \is_array($aMailFoldersHelper) && $iOptimizationLimit < \count($aMailFoldersHelper))
|
||||||
{
|
{
|
||||||
if ($this->oLogger)
|
if ($this->oLogger)
|
||||||
{
|
{
|
||||||
|
|
@ -2056,7 +2056,7 @@ class MailClient
|
||||||
'drafts',
|
'drafts',
|
||||||
'junk', 'spam',
|
'junk', 'spam',
|
||||||
'trash', 'bin',
|
'trash', 'bin',
|
||||||
'archive', 'allmail', 'all',
|
'archives', 'archive', 'allmail', 'all',
|
||||||
'starred', 'flagged', 'important',
|
'starred', 'flagged', 'important',
|
||||||
'contacts', 'chats'
|
'contacts', 'chats'
|
||||||
);
|
);
|
||||||
|
|
@ -2064,10 +2064,21 @@ class MailClient
|
||||||
$aNewMailFoldersHelper = array();
|
$aNewMailFoldersHelper = array();
|
||||||
|
|
||||||
$iCountLimit = $iForeachLimit;
|
$iCountLimit = $iForeachLimit;
|
||||||
|
|
||||||
foreach ($aMailFoldersHelper as $iIndex => /* @var $oImapFolder \MailSo\Mail\Folder */ $oFolder)
|
foreach ($aMailFoldersHelper as $iIndex => /* @var $oImapFolder \MailSo\Mail\Folder */ $oFolder)
|
||||||
{
|
{
|
||||||
// normal and subscribed only
|
// mandatory folders
|
||||||
if ($oFolder && ($oFolder->IsSubscribed() || \in_array(\strtolower($oFolder->NameRaw()), $aFilteredNames)))
|
if ($oFolder && \in_array(\strtolower($oFolder->NameRaw()), $aFilteredNames))
|
||||||
|
{
|
||||||
|
$aNewMailFoldersHelper[] = $oFolder;
|
||||||
|
$aMailFoldersHelper[$iIndex] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($aMailFoldersHelper as $iIndex => /* @var $oImapFolder \MailSo\Mail\Folder */ $oFolder)
|
||||||
|
{
|
||||||
|
// subscribed folders
|
||||||
|
if ($oFolder && $oFolder->IsSubscribed())
|
||||||
{
|
{
|
||||||
$aNewMailFoldersHelper[] = $oFolder;
|
$aNewMailFoldersHelper[] = $oFolder;
|
||||||
|
|
||||||
|
|
@ -2205,7 +2216,7 @@ class MailClient
|
||||||
}
|
}
|
||||||
|
|
||||||
$iCount = \count($aMailFoldersHelper);
|
$iCount = \count($aMailFoldersHelper);
|
||||||
$aMailFoldersHelper = $this->folerListOptimization($aMailFoldersHelper, $iOptimizationLimit);
|
$aMailFoldersHelper = $this->folderListOptimization($aMailFoldersHelper, $iOptimizationLimit);
|
||||||
|
|
||||||
$bOptimized = $iCount !== \count($aMailFoldersHelper);
|
$bOptimized = $iCount !== \count($aMailFoldersHelper);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3371,7 +3371,7 @@ class Actions
|
||||||
$oCacher = $this->Cacher(null, true);
|
$oCacher = $this->Cacher(null, true);
|
||||||
$oHttp = \MailSo\Base\Http::SingletonInstance();
|
$oHttp = \MailSo\Base\Http::SingletonInstance();
|
||||||
|
|
||||||
if (0 === \strlen($sDomain) || $oHttp->CheckLocalhost($sDomain) || !$oCacher)
|
if (0 === \strlen($sDomain) || $oHttp->CheckLocalhost($sDomain) || !$oCacher || !$oCacher->Verify(true))
|
||||||
{
|
{
|
||||||
return 'NO';
|
return 'NO';
|
||||||
}
|
}
|
||||||
|
|
@ -5028,8 +5028,7 @@ class Actions
|
||||||
$sNamespace = $oFolderCollection->GetNamespace();
|
$sNamespace = $oFolderCollection->GetNamespace();
|
||||||
$sParent = empty($sNamespace) ? '' : \substr($sNamespace, 0, -1);
|
$sParent = empty($sNamespace) ? '' : \substr($sNamespace, 0, -1);
|
||||||
|
|
||||||
$oInboxFolder = $oFolderCollection->GetByFullNameRaw('INBOX');
|
$sDelimiter = $oFolderCollection->FindDelimiter();
|
||||||
$sDelimiter = $oInboxFolder ? $oInboxFolder->Delimiter() : '/';
|
|
||||||
|
|
||||||
$aList = array();
|
$aList = array();
|
||||||
$aMap = $this->systemFoldersNames($oAccount);
|
$aMap = $this->systemFoldersNames($oAccount);
|
||||||
|
|
@ -5108,7 +5107,8 @@ class Actions
|
||||||
if ($bDoItAgain)
|
if ($bDoItAgain)
|
||||||
{
|
{
|
||||||
$oFolderCollection = $this->MailClient()->Folders('', '*',
|
$oFolderCollection = $this->MailClient()->Folders('', '*',
|
||||||
!!$this->Config()->Get('labs', 'use_imap_list_subscribe', true)
|
!!$this->Config()->Get('labs', 'use_imap_list_subscribe', true),
|
||||||
|
(int) $this->Config()->Get('labs', 'imap_folder_list_limit', 200)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($oFolderCollection)
|
if ($oFolderCollection)
|
||||||
|
|
@ -5950,9 +5950,7 @@ class Actions
|
||||||
{
|
{
|
||||||
$this->smtpSendMessage($oAccount, $oMessage, $rMessageStream, $iMessageStreamSize, $bDsn, true);
|
$this->smtpSendMessage($oAccount, $oMessage, $rMessageStream, $iMessageStreamSize, $bDsn, true);
|
||||||
|
|
||||||
$this->deleteMessageAttachmnets($oAccount);
|
if (\is_array($aDraftInfo) && 3 === \count($aDraftInfo))
|
||||||
|
|
||||||
if (is_array($aDraftInfo) && 3 === count($aDraftInfo))
|
|
||||||
{
|
{
|
||||||
$sDraftInfoType = $aDraftInfo[0];
|
$sDraftInfoType = $aDraftInfo[0];
|
||||||
$sDraftInfoUid = $aDraftInfo[1];
|
$sDraftInfoUid = $aDraftInfo[1];
|
||||||
|
|
@ -6035,7 +6033,9 @@ class Actions
|
||||||
@\fclose($rMessageStream);
|
@\fclose($rMessageStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 < strlen($sDraftFolder) && 0 < strlen($sDraftUid))
|
$this->deleteMessageAttachmnets($oAccount);
|
||||||
|
|
||||||
|
if (0 < \strlen($sDraftFolder) && 0 < \strlen($sDraftUid))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,7 @@ class Social
|
||||||
{
|
{
|
||||||
$sResult = '';
|
$sResult = '';
|
||||||
$sLoginUrl = '';
|
$sLoginUrl = '';
|
||||||
|
$oAccount = null;
|
||||||
|
|
||||||
$bLogin = false;
|
$bLogin = false;
|
||||||
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
||||||
|
|
@ -347,13 +348,7 @@ class Social
|
||||||
if ($aUserData && \is_array($aUserData) &&
|
if ($aUserData && \is_array($aUserData) &&
|
||||||
!empty($aUserData['Email']) && isset($aUserData['Password']))
|
!empty($aUserData['Email']) && isset($aUserData['Password']))
|
||||||
{
|
{
|
||||||
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Password']);
|
$iErrorCode = $this->loginProcess($oAccount, $aUserData['Email'], $aUserData['Password']);
|
||||||
if ($oAccount instanceof \RainLoop\Model\Account)
|
|
||||||
{
|
|
||||||
$this->oActions->AuthToken($oAccount);
|
|
||||||
|
|
||||||
$iErrorCode = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -421,6 +416,7 @@ class Social
|
||||||
$mData = false;
|
$mData = false;
|
||||||
$sUserData = '';
|
$sUserData = '';
|
||||||
$aUserData = false;
|
$aUserData = false;
|
||||||
|
$oAccount = null;
|
||||||
|
|
||||||
$bLogin = false;
|
$bLogin = false;
|
||||||
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
||||||
|
|
@ -494,13 +490,7 @@ class Social
|
||||||
if ($aUserData && \is_array($aUserData) &&
|
if ($aUserData && \is_array($aUserData) &&
|
||||||
!empty($aUserData['Email']) && isset($aUserData['Password']))
|
!empty($aUserData['Email']) && isset($aUserData['Password']))
|
||||||
{
|
{
|
||||||
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Password']);
|
$iErrorCode = $this->loginProcess($oAccount, $aUserData['Email'], $aUserData['Password']);
|
||||||
if ($oAccount instanceof \RainLoop\Model\Account)
|
|
||||||
{
|
|
||||||
$this->oActions->AuthToken($oAccount);
|
|
||||||
|
|
||||||
$iErrorCode = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -543,6 +533,7 @@ class Social
|
||||||
$sLoginUrl = '';
|
$sLoginUrl = '';
|
||||||
|
|
||||||
$sSocialName = '';
|
$sSocialName = '';
|
||||||
|
$oAccount = null;
|
||||||
|
|
||||||
$bLogin = false;
|
$bLogin = false;
|
||||||
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
||||||
|
|
@ -670,13 +661,7 @@ class Social
|
||||||
!empty($aUserData['Email']) &&
|
!empty($aUserData['Email']) &&
|
||||||
isset($aUserData['Password']))
|
isset($aUserData['Password']))
|
||||||
{
|
{
|
||||||
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Password']);
|
$iErrorCode = $this->loginProcess($oAccount, $aUserData['Email'], $aUserData['Password']);
|
||||||
if ($oAccount instanceof \RainLoop\Model\Account)
|
|
||||||
{
|
|
||||||
$this->oActions->AuthToken($oAccount);
|
|
||||||
|
|
||||||
$iErrorCode = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -876,4 +861,42 @@ class Social
|
||||||
{
|
{
|
||||||
return \implode('_', array('twitter', \md5($oTwitter->config['consumer_secret']), $sTwitterUserId, APP_SALT));
|
return \implode('_', array('twitter', \md5($oTwitter->config['consumer_secret']), $sTwitterUserId, APP_SALT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \RainLoop\Model\Account|null $oAccount
|
||||||
|
* @param string $sEmail
|
||||||
|
* @param string $sPassword
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
private function loginProcess(&$oAccount, $sEmail, $sPassword)
|
||||||
|
{
|
||||||
|
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
|
||||||
|
if ($oAccount instanceof \RainLoop\Model\Account)
|
||||||
|
{
|
||||||
|
$this->oActions->AuthToken($oAccount);
|
||||||
|
$iErrorCode = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$oAccount = null;
|
||||||
|
$iErrorCode = \RainLoop\Notifications::AuthError;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (\RainLoop\Exceptions\ClientException $oException)
|
||||||
|
{
|
||||||
|
$iErrorCode = $oException->getCode();
|
||||||
|
}
|
||||||
|
catch (\Exception $oException)
|
||||||
|
{
|
||||||
|
unset($oException);
|
||||||
|
$iErrorCode = \RainLoop\Notifications::UnknownError;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $iErrorCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<input type="password" class="i18n input-block-level inputPassword checkAutocomplete" name="RainLoopPassword" id="RainLoopPassword"
|
<input type="password" class="i18n input-block-level inputPassword checkAutocomplete" name="RainLoopPassword" id="RainLoopPassword"
|
||||||
autocorrect="off" autocapitalize="off" spellcheck="false"
|
autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-bind="textInput: password" data-i18n-placeholder="LOGIN/LABEL_PASSWORD" />
|
data-bind="textInput: password, hasFocus: passwordFocus" data-i18n-placeholder="LOGIN/LABEL_PASSWORD" />
|
||||||
<span class="add-on">
|
<span class="add-on">
|
||||||
<i class="icon-key"></i>
|
<i class="icon-key"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{INCLUDE/BottomControlGroup/PLACE}}
|
{{INCLUDE/BottomControlGroup/PLACE}}
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<button type="submit" class="btn btn-large btn-block buttonLogin" data-bind="command: submitCommand">
|
<button type="submit" class="btn btn-large btn-block buttonLogin" data-bind="command: submitCommand, hasFocus: submitFocus">
|
||||||
<i class="icon-spinner animated" data-bind="visible: submitRequest"></i>
|
<i class="icon-spinner animated" data-bind="visible: submitRequest"></i>
|
||||||
<span class="i18n i18n-animation" data-i18n-text="LOGIN/BUTTON_SIGN_IN" data-bind="visible: !submitRequest()"></span>
|
<span class="i18n i18n-animation" data-i18n-text="LOGIN/BUTTON_SIGN_IN" data-bind="visible: !submitRequest()"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,7 @@
|
||||||
<button type="button" class="close" data-bind="click: function () { folderList.error(''); }">×</button>
|
<button type="button" class="close" data-bind="click: function () { folderList.error(''); }">×</button>
|
||||||
<span data-bind="text: folderList.error"></span>
|
<span data-bind="text: folderList.error"></span>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<table class="table table-hover list-table" data-bind="i18nUpdate: folderList" style="margin-top: 40px">
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<table class="table table-hover list-table" data-bind="i18nUpdate: folderList">
|
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col />
|
<col />
|
||||||
<col style="width: 1%" />
|
<col style="width: 1%" />
|
||||||
|
|
|
||||||
|
|
@ -250,17 +250,17 @@ TITLE_UPDATE_ACCOUNT = "Upravit účet?"
|
||||||
BUTTON_UPDATE_ACCOUNT = "Upravit"
|
BUTTON_UPDATE_ACCOUNT = "Upravit"
|
||||||
|
|
||||||
[POPUPS_IDENTITY]
|
[POPUPS_IDENTITY]
|
||||||
TITLE_ADD_IDENTITY = "Add Identity?"
|
TITLE_ADD_IDENTITY = "Opravdu přidat?"
|
||||||
TITLE_UPDATE_IDENTITY = "Update Identity?"
|
TITLE_UPDATE_IDENTITY = "Uložit změny?"
|
||||||
BUTTON_ADD_IDENTITY = "Add"
|
BUTTON_ADD_IDENTITY = "Přídat"
|
||||||
BUTTON_UPDATE_IDENTITY = "Update"
|
BUTTON_UPDATE_IDENTITY = "Uložit"
|
||||||
LABEL_EMAIL = "Email"
|
LABEL_EMAIL = "Email"
|
||||||
LABEL_NAME = "Name"
|
LABEL_NAME = "Jméno"
|
||||||
LABEL_REPLY_TO = "Reply-To"
|
LABEL_REPLY_TO = "Adresa odpovědi"
|
||||||
LABEL_SIGNATURE = "Signature"
|
LABEL_SIGNATURE = "Podpis"
|
||||||
LABEL_CC = "Cc"
|
LABEL_CC = "kopie"
|
||||||
LABEL_BCC = "Bcc"
|
LABEL_BCC = "Skrytá"
|
||||||
LABEL_SIGNATURE_INSERT_BEFORE = "Insert this signature before quoted text in replies"
|
LABEL_SIGNATURE_INSERT_BEFORE = "V odpovědích vložit podpis před citovaný text."
|
||||||
|
|
||||||
[POPUPS_CREATE_FOLDER]
|
[POPUPS_CREATE_FOLDER]
|
||||||
TITLE_CREATE_FOLDER = "Vytvořit složku?"
|
TITLE_CREATE_FOLDER = "Vytvořit složku?"
|
||||||
|
|
@ -405,14 +405,14 @@ LABEL_FILTERS_NAME = "Filtry"
|
||||||
LABEL_TEMPLATES_NAME = "Templates"
|
LABEL_TEMPLATES_NAME = "Templates"
|
||||||
LABEL_SECURITY_NAME = "Zabezpečení"
|
LABEL_SECURITY_NAME = "Zabezpečení"
|
||||||
LABEL_SOCIAL_NAME = "Sociální"
|
LABEL_SOCIAL_NAME = "Sociální"
|
||||||
LABEL_THEMES_NAME = "Motívy"
|
LABEL_THEMES_NAME = "Motivy"
|
||||||
LABEL_CHANGE_PASSWORD_NAME = "Heslo"
|
LABEL_CHANGE_PASSWORD_NAME = "Heslo"
|
||||||
LABEL_OPEN_PGP_NAME = "OpenPGP"
|
LABEL_OPEN_PGP_NAME = "OpenPGP"
|
||||||
BUTTON_BACK = "Zpět"
|
BUTTON_BACK = "Zpět"
|
||||||
|
|
||||||
[SETTINGS_FILTERS]
|
[SETTINGS_FILTERS]
|
||||||
LEGEND_FILTERS = "Filtry"
|
LEGEND_FILTERS = "Filtry"
|
||||||
BUTTON_SAVE = "Uložiz"
|
BUTTON_SAVE = "Uložit"
|
||||||
BUTTON_ADD_FILTER = "Přidat filtr"
|
BUTTON_ADD_FILTER = "Přidat filtr"
|
||||||
BUTTON_DELETE = "Smazat"
|
BUTTON_DELETE = "Smazat"
|
||||||
BUTTON_RAW_SCRIPT = "Použít uživatelský skript"
|
BUTTON_RAW_SCRIPT = "Použít uživatelský skript"
|
||||||
|
|
@ -474,9 +474,9 @@ LABEL_ANIMATION_NORMAL = "Normlání"
|
||||||
LABEL_ANIMATION_NONE = "Žádné"
|
LABEL_ANIMATION_NONE = "Žádné"
|
||||||
LABEL_VIEW_OPTIONS = "Možnosti zobrazení"
|
LABEL_VIEW_OPTIONS = "Možnosti zobrazení"
|
||||||
LABEL_USE_PREVIEW_PANE = "Používate panel rychlého zobrazení"
|
LABEL_USE_PREVIEW_PANE = "Používate panel rychlého zobrazení"
|
||||||
LABEL_USE_CHECKBOXES_IN_LIST = "Zobrazení zaškrtávácích políče v seznamu"
|
LABEL_USE_CHECKBOXES_IN_LIST = "Zobrazení zaškrtávácích políček v seznamu"
|
||||||
LABEL_USE_THREADS = "Zobrazit jako konverzaceZobraziť ako konverzácie"
|
LABEL_USE_THREADS = "Zobrazit jako konverzace"
|
||||||
LABEL_REPLY_SAME_FOLDER = "Ukládat odpovědit do složky se správou, které se týkají"
|
LABEL_REPLY_SAME_FOLDER = "Ukládat odpovědi do složky se zprávou, které se týkají"
|
||||||
LABEL_SHOW_IMAGES = "Vždy zobrazovat obrázky v těle správy"
|
LABEL_SHOW_IMAGES = "Vždy zobrazovat obrázky v těle správy"
|
||||||
LABEL_SHOW_ANIMATION = "Animovat"
|
LABEL_SHOW_ANIMATION = "Animovat"
|
||||||
LABEL_MESSAGE_PER_PAGE = "Zpráv na stranu"
|
LABEL_MESSAGE_PER_PAGE = "Zpráv na stranu"
|
||||||
|
|
@ -538,14 +538,14 @@ TO_MANY_FOLDERS_DESC_2 = "Můžeme zobrazit jen část z nich, abychom zabránil
|
||||||
|
|
||||||
[SETTINGS_ACCOUNTS]
|
[SETTINGS_ACCOUNTS]
|
||||||
LEGEND_ACCOUNTS = "Seznam účtů"
|
LEGEND_ACCOUNTS = "Seznam účtů"
|
||||||
LEGEND_IDENTITIES = "Identities"
|
LEGEND_IDENTITIES = "Identity"
|
||||||
LEGEND_ACCOUNTS_AND_IDENTITIES = "Accounts and Identities"
|
LEGEND_ACCOUNTS_AND_IDENTITIES = "Účty a identity"
|
||||||
BUTTON_ADD_ACCOUNT = "Přidat účet"
|
BUTTON_ADD_ACCOUNT = "Přidat účet"
|
||||||
BUTTON_ADD_IDENTITY = "Add an Identity"
|
BUTTON_ADD_IDENTITY = "Přidat identitu"
|
||||||
BUTTON_DELETE = "Odstranit"
|
BUTTON_DELETE = "Odstranit"
|
||||||
LOADING_PROCESS = "Aktualizace seznamu účtů"
|
LOADING_PROCESS = "Aktualizace seznamu účtů"
|
||||||
DELETING_ASK = "Opravdu to chcete?"
|
DELETING_ASK = "Opravdu to chcete?"
|
||||||
DEFAULT_IDENTITY_LABEL = "default"
|
DEFAULT_IDENTITY_LABEL = "výchozí"
|
||||||
|
|
||||||
[SETTINGS_IDENTITIES]
|
[SETTINGS_IDENTITIES]
|
||||||
LEGEND_IDENTITY = "Identita"
|
LEGEND_IDENTITY = "Identita"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue