Merge branch 'stable'
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@
|
||||
/data/tmp/*
|
||||
/build
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
/npm-debug.log
|
||||
/test.php
|
||||
/main.html
|
||||
|
||||
@@ -15,7 +15,7 @@ npm-debug.log
|
||||
!/tests/unit/testData/cache/.data
|
||||
/tests/integration/config.php
|
||||
.phpunit.result.cache
|
||||
composer.phar
|
||||
vendor/
|
||||
/composer.phar
|
||||
/vendor/
|
||||
/custom/Espo/Custom/*
|
||||
/install/config.php
|
||||
@@ -178,6 +178,8 @@ class Auth
|
||||
}
|
||||
|
||||
if ($hasAuthData) {
|
||||
$authResult = null;
|
||||
|
||||
try {
|
||||
$authResult = $this->authentication->login($username, $password, $request, $authenticationMethod);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class BaseLanguage implements Loader
|
||||
$this->fileManager,
|
||||
$this->metadata,
|
||||
$this->dataCache,
|
||||
$this->config->get('useCache')
|
||||
$this->config->get('useCache') ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class DefaultLanguage extends BaseLanguage
|
||||
$this->fileManager,
|
||||
$this->metadata,
|
||||
$this->dataCache,
|
||||
$this->config->get('useCache')
|
||||
$this->config->get('useCache') ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class Language implements Loader
|
||||
$this->fileManager,
|
||||
$this->metadata,
|
||||
$this->dataCache,
|
||||
$this->config->get('useCache')
|
||||
$this->config->get('useCache') ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class Metadata implements Loader
|
||||
|
||||
public function load() : MetadataService
|
||||
{
|
||||
$useCache = $this->config->get('useCache');
|
||||
$useCache = $this->config->get('useCache') ?? false;
|
||||
|
||||
return new MetadataService($this->fileManager, $this->dataCache, $useCache);
|
||||
}
|
||||
|
||||
@@ -123,4 +123,22 @@ class DefaultNotificator implements Notificator
|
||||
|
||||
return $this->userIdEnabledMap[$userId];
|
||||
}
|
||||
|
||||
/**
|
||||
* For backward compatibility.
|
||||
* @todo Remove.
|
||||
*/
|
||||
protected function getEntityManager()
|
||||
{
|
||||
return $this->entityManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* For backward compatibility.
|
||||
* @todo Remove.
|
||||
*/
|
||||
protected function getUser()
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
|
||||
+239
-228
File diff suppressed because it is too large
Load Diff
@@ -82,12 +82,24 @@ class SystemHelper extends \Espo\Core\Utils\System
|
||||
|
||||
public function getBaseUrl()
|
||||
{
|
||||
$pageUrl = ($_SERVER["HTTPS"] == 'on') ? 'https://' : 'http://';
|
||||
$pageUrl = 'http://';
|
||||
|
||||
if ($_SERVER["SERVER_PORT"] != "80") {
|
||||
$pageUrl .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
} else {
|
||||
if (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https') {
|
||||
$pageUrl = 'https://';
|
||||
}
|
||||
|
||||
if (isset($_SERVER['HTTPS']) && $_SERVER["HTTPS"] == 'on') {
|
||||
$pageUrl = 'https://';
|
||||
}
|
||||
|
||||
if ($_SERVER["SERVER_PORT"] == '443') {
|
||||
$pageUrl = 'https://';
|
||||
}
|
||||
|
||||
if (in_array($_SERVER["SERVER_PORT"], ['80', '443'])) {
|
||||
$pageUrl .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
} else {
|
||||
$pageUrl .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
|
||||
$baseUrl = str_ireplace('/install/index.php', '', $pageUrl);
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
{foreach from=$phpRequirementList key=name item=value}
|
||||
<tr class="list-row">
|
||||
<td class="cell col-md-5">
|
||||
{if $langs['systemRequirements'][$name] eq ''}
|
||||
{$name}
|
||||
{if isset($langs['systemRequirements'][$name])}
|
||||
{$langs['systemRequirements'][{$name}]}
|
||||
{else}
|
||||
{$langs['systemRequirements'][{$name}]}
|
||||
{$name}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cell col-md-3">{$value['actual']}</td>
|
||||
@@ -41,10 +41,10 @@
|
||||
{foreach from=$mysqlRequirementList key=name item=value}
|
||||
<tr class="list-row">
|
||||
<td class="cell col-md-5">
|
||||
{if $langs['systemRequirements'][$name] eq ''}
|
||||
{$name}
|
||||
{if isset($langs['systemRequirements'][$name])}
|
||||
{$langs['systemRequirements'][{$name}]}
|
||||
{else}
|
||||
{$langs['systemRequirements'][{$name}]}
|
||||
{$name}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cell col-md-3">{$value['actual']}</td>
|
||||
@@ -68,10 +68,10 @@
|
||||
{foreach from=$permissionRequirementList key=name item=value}
|
||||
<tr class="list-row">
|
||||
<td class="cell col-md-5">
|
||||
{if $langs['systemRequirements'][$name] eq ''}
|
||||
{$name}
|
||||
{if isset($langs['systemRequirements'][$name])}
|
||||
{$langs['systemRequirements'][{$name}]}
|
||||
{else}
|
||||
{$langs['systemRequirements'][{$name}]}
|
||||
{$name}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cell col-md-3">{$langs['systemRequirements'][{$value['type']}]}</td>
|
||||
|
||||
@@ -72,30 +72,31 @@ abstract class Smarty_Internal_CompileBase
|
||||
}
|
||||
// named attribute
|
||||
} else {
|
||||
$kv = each($mixed);
|
||||
// option flag?
|
||||
if (in_array($kv['key'], $this->option_flags)) {
|
||||
if (is_bool($kv['value'])) {
|
||||
$_indexed_attr[$kv['key']] = $kv['value'];
|
||||
} elseif (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) {
|
||||
if (trim($kv['value']) == 'true') {
|
||||
$_indexed_attr[$kv['key']] = true;
|
||||
foreach ($mixed as $k => $v) {
|
||||
// option flag?
|
||||
if (in_array($k, $this->option_flags)) {
|
||||
if (is_bool($v)) {
|
||||
$_indexed_attr[$k] = $v;
|
||||
} elseif (is_string($v) && in_array(trim($v, '\'"'), array('true', 'false'))) {
|
||||
if (trim($v) == 'true') {
|
||||
$_indexed_attr[$k] = true;
|
||||
} else {
|
||||
$_indexed_attr[$k] = false;
|
||||
}
|
||||
} elseif (is_numeric($v) && in_array($v, array(0, 1))) {
|
||||
if ($v == 1) {
|
||||
$_indexed_attr[$k] = true;
|
||||
} else {
|
||||
$_indexed_attr[$k] = false;
|
||||
}
|
||||
} else {
|
||||
$_indexed_attr[$kv['key']] = false;
|
||||
}
|
||||
} elseif (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
|
||||
if ($kv['value'] == 1) {
|
||||
$_indexed_attr[$kv['key']] = true;
|
||||
} else {
|
||||
$_indexed_attr[$kv['key']] = false;
|
||||
$compiler->trigger_template_error("illegal value of option flag \"{$k}\"", $compiler->lex->taglineno);
|
||||
}
|
||||
// must be named attribute
|
||||
} else {
|
||||
$compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $compiler->lex->taglineno);
|
||||
reset($mixed);
|
||||
$_indexed_attr[key($mixed)] = $mixed[key($mixed)];
|
||||
}
|
||||
// must be named attribute
|
||||
} else {
|
||||
reset($mixed);
|
||||
$_indexed_attr[key($mixed)] = $mixed[key($mixed)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user