mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Some small code improvements
This commit is contained in:
parent
a41afb17ad
commit
b77854e421
4 changed files with 21 additions and 12 deletions
|
|
@ -83,12 +83,16 @@ trait UserAuth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!\str_contains($sEmail, '@')) {
|
||||||
$sDefDomain = \trim($this->Config()->Get('login', 'default_domain', ''));
|
$sDefDomain = \trim($this->Config()->Get('login', 'default_domain', ''));
|
||||||
if (!\str_contains($sEmail, '@') && \strlen($sDefDomain)) {
|
if (\strlen($sDefDomain)) {
|
||||||
$this->Logger()->Write('Default domain "' . $sDefDomain . '" was used. (' . $sEmail . ' > ' . $sEmail . '@' . $sDefDomain . ')',
|
$this->Logger()->Write('Default domain "' . $sDefDomain . '" was used. (' . $sEmail . ' > ' . $sEmail . '@' . $sDefDomain . ')',
|
||||||
\LOG_INFO, 'LOGIN');
|
\LOG_INFO, 'LOGIN');
|
||||||
|
|
||||||
$sEmail .= '@' . $sDefDomain;
|
$sEmail .= '@' . $sDefDomain;
|
||||||
|
} else {
|
||||||
|
$this->Logger()->Write('Default domain not configured.', \LOG_INFO, 'LOGIN');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -836,14 +836,17 @@ class ServiceActions
|
||||||
{
|
{
|
||||||
\header('Content-Type: application/javascript; charset=utf-8');
|
\header('Content-Type: application/javascript; charset=utf-8');
|
||||||
$this->oHttp->ServerNoCache();
|
$this->oHttp->ServerNoCache();
|
||||||
|
try {
|
||||||
$sResult = 'rl.initData('
|
$sResult = 'rl.initData('
|
||||||
.Utils::jsonEncode($this->oActions->AppData($bAdmin))
|
. Utils::jsonEncode($this->oActions->AppData($bAdmin))
|
||||||
.');';
|
. ');';
|
||||||
|
|
||||||
$this->Logger()->Write($sResult, \LOG_INFO, 'APPDATA');
|
$this->Logger()->Write($sResult, \LOG_INFO, 'APPDATA');
|
||||||
|
|
||||||
return $sResult;
|
return $sResult;
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
return 'alert(' . \json_encode('ERROR: ' . $e->getMessage()) . ');';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function compileTemplates(bool $bAdmin = false) : string
|
public function compileTemplates(bool $bAdmin = false) : string
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@
|
||||||
<span data-i18n="MESSAGE/TAGS"></span>:
|
<span data-i18n="MESSAGE/TAGS"></span>:
|
||||||
<span class="messageAssignedTags" data-bind="html: message().tagsToHTML()"></span>
|
<span class="messageAssignedTags" data-bind="html: message().tagsToHTML()"></span>
|
||||||
<div class="btn-group" data-bind="registerBootstrapDropdown: true" style="display: inline-block">
|
<div class="btn-group" data-bind="registerBootstrapDropdown: true" style="display: inline-block">
|
||||||
<a class="btn btn-thin btn-transparent dropdown-toggle fontastic" id="tags-dropdown-id" href="#" tabindex="-1">☰</a>
|
<a class="btn btn-thin btn-transparent dropdown-toggle fontastic" id="tags-dropdown-id" href="#" tabindex="-1">🏷</a>
|
||||||
<menu class="dropdown-menu right-edge" role="menu" aria-labelledby="tags-dropdown-id">
|
<menu class="dropdown-menu right-edge" role="menu" aria-labelledby="tags-dropdown-id">
|
||||||
<div data-bind="foreach: message().tagOptions()">
|
<div data-bind="foreach: message().tagOptions()">
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ if (defined('APP_VERSION'))
|
||||||
'json' => function_exists('json_decode'),
|
'json' => function_exists('json_decode'),
|
||||||
'libxml' => function_exists('libxml_use_internal_errors'),
|
'libxml' => function_exists('libxml_use_internal_errors'),
|
||||||
'dom' => class_exists('DOMDocument')
|
'dom' => class_exists('DOMDocument')
|
||||||
|
// https://github.com/the-djmaze/snappymail/issues/392
|
||||||
|
// 'phar' => class_exists('PharData')
|
||||||
);
|
);
|
||||||
|
|
||||||
if (in_array(false, $aRequirements))
|
if (in_array(false, $aRequirements))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue