mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +03:00
Small fixes
This commit is contained in:
parent
60b449b9f8
commit
195d13dc0d
6 changed files with 64 additions and 32 deletions
|
|
@ -6414,14 +6414,9 @@ class Actions
|
|||
$bResult = false;
|
||||
if (!empty($sKey) && ($bForce || $this->Config()->Get('cache', 'enable', true) && $this->Config()->Get('cache', 'http', true)))
|
||||
{
|
||||
$iLast = 1382478804;
|
||||
$iExpires = 2002478804;
|
||||
|
||||
header('Cache-Control: private', true);
|
||||
header('ETag: '.\md5('Etag:'.\md5($sKey.\md5($this->Config()->Get('cache', 'index', '')))), true);
|
||||
header('Last-Modified: '.\gmdate('D, d M Y H:i:s', $iLast).' UTC', true);
|
||||
header('Expires: '.\gmdate('D, j M Y H:i:s', $iExpires).' UTC', true);
|
||||
header('Connection: close');
|
||||
$this->oHttp->ServerUseCache(
|
||||
\md5('Etag:'.\md5($sKey.\md5($this->Config()->Get('cache', 'index', '')))),
|
||||
1382478804, 2002478804);
|
||||
|
||||
$bResult = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,11 @@ class Service
|
|||
$bAdmin = true;
|
||||
}
|
||||
|
||||
if ($this->oHttp->IsPost())
|
||||
{
|
||||
$this->oHttp->ServerNoCache();
|
||||
}
|
||||
|
||||
if ($bAdmin && !$this->oActions->Config()->Get('security', 'allow_admin_panel', true))
|
||||
{
|
||||
echo $this->oActions->ErrorTemplates('Access Denied.',
|
||||
|
|
@ -127,7 +132,7 @@ class Service
|
|||
{
|
||||
@header('Content-Type: text/html; charset=utf-8');
|
||||
$this->oHttp->ServerNoCache();
|
||||
|
||||
|
||||
$aTemplateParameters = $this->indexTemplateParameters($bAdmin);
|
||||
|
||||
$sCacheFileName = '';
|
||||
|
|
|
|||
|
|
@ -196,6 +196,7 @@ class ServiceActions
|
|||
$this->Plugins()->RunHook('filter.ajax-response', array($sAction, &$aResponseItem));
|
||||
|
||||
@\header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
$sResult = \MailSo\Base\Utils::Php2js($aResponseItem, $this->Logger());
|
||||
|
||||
$sObResult = @\ob_get_clean();
|
||||
|
|
@ -1115,7 +1116,7 @@ class ServiceActions
|
|||
$sResult = empty($sLangJs) ? 'null' : '{'.\substr($sLangJs, 0, -1).'}';
|
||||
|
||||
return
|
||||
($bWrapByScriptTag ? '<script type="text/javascript" data-cfasync="false">' : '').
|
||||
($bWrapByScriptTag ? '<script data-cfasync="false">' : '').
|
||||
'window.rainloopI18N='.$sResult.';'.$sMoment.
|
||||
($bWrapByScriptTag ? '</script>' : '')
|
||||
;
|
||||
|
|
@ -1130,7 +1131,7 @@ class ServiceActions
|
|||
private function compileAppData($aAppData, $bWrapByScriptTag = true)
|
||||
{
|
||||
return
|
||||
($bWrapByScriptTag ? '<script type="text/javascript" data-cfasync="false">' : '').
|
||||
($bWrapByScriptTag ? '<script data-cfasync="false">' : '').
|
||||
'window.rainloopAppData='.\json_encode($aAppData).';'.
|
||||
'if(window.__rlah_set){__rlah_set()};'.
|
||||
($bWrapByScriptTag ? '</script>' : '')
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ class Social
|
|||
@\header('Content-Type: text/html; charset=utf-8');
|
||||
$sCallBackType = $bLogin ? '_login' : '';
|
||||
$sConnectionFunc = 'rl_'.\md5(\RainLoop\Utils::GetConnectionToken()).'_google'.$sCallBackType.'_service';
|
||||
$sResult = '<script type="text/javascript" data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sResult = '<script data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sConnectionFunc.'('.$iErrorCode.'); self && self.close && self.close();</script>';
|
||||
}
|
||||
|
||||
|
|
@ -520,11 +520,12 @@ class Social
|
|||
else
|
||||
{
|
||||
$this->oHttp->ServerNoCache();
|
||||
|
||||
@\header('Content-Type: text/html; charset=utf-8');
|
||||
|
||||
$sCallBackType = $bLogin ? '_login' : '';
|
||||
$sConnectionFunc = 'rl_'.\md5(\RainLoop\Utils::GetConnectionToken()).'_facebook'.$sCallBackType.'_service';
|
||||
$sResult = '<script type="text/javascript" data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sResult = '<script data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sConnectionFunc.'('.$iErrorCode.'); self && self.close && self.close();</script>';
|
||||
}
|
||||
|
||||
|
|
@ -720,7 +721,7 @@ class Social
|
|||
@\header('Content-Type: text/html; charset=utf-8');
|
||||
$sCallBackType = $bLogin ? '_login' : '';
|
||||
$sConnectionFunc = 'rl_'.\md5(\RainLoop\Utils::GetConnectionToken()).'_twitter'.$sCallBackType.'_service';
|
||||
$sResult = '<script type="text/javascript" data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sResult = '<script data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sConnectionFunc.'('.$iErrorCode.'); self && self.close && self.close();</script>';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue