Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc19a6bb5f | |||
| 8cc6a2ddf0 | |||
| c1f0c47cf7 | |||
| 7e71eb0aeb | |||
| 196f787a1f | |||
| b7bec1793c | |||
| b97aa8e3a7 | |||
| 21dcf59f21 | |||
| 326b6c8c53 | |||
| 7ebf0e7bf8 | |||
| 014df8b9d3 | |||
| 6d85055147 | |||
| 077f7d8855 | |||
| 296484360f | |||
| 1071f8a045 | |||
| 962d3a049c | |||
| 161859606a | |||
| a71df0cff6 | |||
| fb9ff0b8c0 | |||
| d1a62baa12 | |||
| cdec7ccfe8 | |||
| 25bc3a40f7 | |||
| 02e5c1fc44 | |||
| 844e9dd8e3 | |||
| 39f2ec83d5 | |||
| e4d2af03a5 | |||
| 37616d69bf | |||
| 4e36f71dd8 | |||
| b5877ac32a | |||
| 92de588a6e | |||
| 700f4b5b10 | |||
| 9c0a7b6778 | |||
| 9a54c66f68 |
+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);
|
||||
}
|
||||
|
||||
@@ -155,9 +155,11 @@ class InjectableFactory
|
||||
|
||||
$dependencyClass = null;
|
||||
|
||||
if ($param->getType()) {
|
||||
$type = $param->getType();
|
||||
|
||||
if ($type && !$type->isBuiltin()) {
|
||||
try {
|
||||
$dependencyClass = $param->getClass();
|
||||
$dependencyClass = new ReflectionClass($type->getName());
|
||||
}
|
||||
catch (Throwable $e) {
|
||||
$badClassName = $param->getType()->getName();
|
||||
@@ -241,15 +243,26 @@ class InjectableFactory
|
||||
}
|
||||
|
||||
$params = $class->getMethod($methodName)->getParameters();
|
||||
|
||||
if (!$params || !count($params)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($skipInstanceCheck) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$injection = $this->container->get($name);
|
||||
|
||||
$paramClass = $params[0]->getClass();
|
||||
$paramClass = null;
|
||||
|
||||
if ($skipInstanceCheck || $paramClass && $paramClass->isInstance($injection)) {
|
||||
$type = $params[0]->getType();
|
||||
|
||||
if ($type && !$type->isBuiltin()) {
|
||||
$paramClass = new ReflectionClass($type->getName());
|
||||
}
|
||||
|
||||
if ($paramClass && $paramClass->isInstance($injection)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class PersonName extends Base
|
||||
$whereItems[] = "CONCAT:({$firstName}, ' ', {$middleName}, ' ', {$lastName})";
|
||||
} else
|
||||
if ($format === 'lastFirstMiddle') {
|
||||
$whereItems[] = "CONCAT:({$lastName}, ' ', {$firstColumn}, ' ', {$middleName})";
|
||||
$whereItems[] = "CONCAT:({$lastName}, ' ', {$firstName}, ' ', {$middleName})";
|
||||
}
|
||||
|
||||
$selectExpression = $this->getSelect($fullList);
|
||||
|
||||
@@ -53,10 +53,10 @@ class ScheduledJob
|
||||
protected $checkingCronPeriod = '25 hours';
|
||||
|
||||
protected $cronSetup = [
|
||||
'linux' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BIN-DIR} -f {CRON-FILE} > /dev/null 2>&1',
|
||||
'linux' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BINARY} -f {CRON-FILE} > /dev/null 2>&1',
|
||||
'windows' => '{PHP-BINARY} -f {FULL-CRON-PATH}',
|
||||
'mac' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BIN-DIR} -f {CRON-FILE} > /dev/null 2>&1',
|
||||
'default' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BIN-DIR} -f {CRON-FILE} > /dev/null 2>&1',
|
||||
'mac' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BINARY} -f {CRON-FILE} > /dev/null 2>&1',
|
||||
'default' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BINARY} -f {CRON-FILE} > /dev/null 2>&1',
|
||||
];
|
||||
|
||||
protected $classFinder;
|
||||
@@ -105,7 +105,6 @@ class ScheduledJob
|
||||
$desc = $language->translate('cronSetup', 'options', 'ScheduledJob');
|
||||
|
||||
$data = array(
|
||||
'PHP-BIN-DIR' => $this->getSystemUtil()->getPhpBin(),
|
||||
'PHP-BINARY' => $this->getSystemUtil()->getPhpBinary(),
|
||||
'CRON-FILE' => $this->cronFile,
|
||||
'DOCUMENT_ROOT' => $this->getSystemUtil()->getRootDir(),
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
namespace Espo\Core\Utils;
|
||||
|
||||
use Symfony\Component\Process\PhpExecutableFinder;
|
||||
|
||||
class System
|
||||
{
|
||||
/**
|
||||
@@ -100,22 +102,11 @@ class System
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path to PHP
|
||||
*
|
||||
* @return string
|
||||
* Deprecated. Use getPhpBinary()
|
||||
*/
|
||||
public function getPhpBin()
|
||||
{
|
||||
if (isset($_SERVER['PHP_PATH']) && !empty($_SERVER['PHP_PATH'])) {
|
||||
return $_SERVER['PHP_PATH'];
|
||||
}
|
||||
|
||||
$phpBin = @exec('which php');
|
||||
if (!empty($phpBin)) {
|
||||
return $phpBin;
|
||||
}
|
||||
|
||||
return defined("PHP_BINDIR") ? PHP_BINDIR . DIRECTORY_SEPARATOR . 'php' : 'php';
|
||||
return $this->getPhpBinary();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,7 +116,7 @@ class System
|
||||
*/
|
||||
public function getPhpBinary()
|
||||
{
|
||||
return defined("PHP_BINARY") ? PHP_BINARY : 'php';
|
||||
return (new PhpExecutableFinder)->find();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,13 +37,7 @@ interface Builder
|
||||
{
|
||||
/**
|
||||
* Build a query instance.
|
||||
* @todo Uncomment when 7.4 is a min supported PHP version. Need the support of contravariant method parameters.
|
||||
* @todo Uncomment when 7.4 is a min supported PHP version.
|
||||
*/
|
||||
//public function build() : Query;
|
||||
|
||||
/**
|
||||
* Clone an existing query for a further modification and building.
|
||||
* @todo Uncomment when 7.4 is a min supported PHP version. Need the support of contravariant method parameters.
|
||||
*/
|
||||
//public function clone(Query $query) : self;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
"isActive": {
|
||||
"nonAdminReadOnly": true
|
||||
},
|
||||
"emailAddress": {
|
||||
"nonAdminReadOnly": true
|
||||
},
|
||||
"teams": {
|
||||
"nonAdminReadOnly": true
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"fields": {
|
||||
"timeZone": {
|
||||
"type": "enum",
|
||||
"detault": "",
|
||||
"default": "",
|
||||
"view": "views/preferences/fields/time-zone"
|
||||
},
|
||||
"dateFormat": {
|
||||
@@ -124,7 +124,8 @@
|
||||
"assignmentNotificationsIgnoreEntityTypeList": {
|
||||
"type": "checklist",
|
||||
"translation": "Global.scopeNamesPlural",
|
||||
"view": "views/preferences/fields/assignment-notifications-ignore-entity-type-list"
|
||||
"view": "views/preferences/fields/assignment-notifications-ignore-entity-type-list",
|
||||
"default": []
|
||||
},
|
||||
"assignmentEmailNotificationsIgnoreEntityTypeList": {
|
||||
"type": "checklist",
|
||||
@@ -140,14 +141,17 @@
|
||||
},
|
||||
"signature": {
|
||||
"type": "wysiwyg",
|
||||
"view": "views/preferences/fields/signature"
|
||||
"view": "views/preferences/fields/signature",
|
||||
"default": ""
|
||||
},
|
||||
"defaultReminders": {
|
||||
"type": "jsonArray",
|
||||
"view": "crm:views/meeting/fields/reminders"
|
||||
"view": "crm:views/meeting/fields/reminders",
|
||||
"default": []
|
||||
},
|
||||
"theme": {
|
||||
"type": "enum",
|
||||
"default": "",
|
||||
"view": "views/preferences/fields/theme",
|
||||
"translation": "Global.themes"
|
||||
},
|
||||
@@ -173,7 +177,8 @@
|
||||
},
|
||||
"doNotFillAssignedUserIfNotRequired": {
|
||||
"type": "bool",
|
||||
"tooltip": true
|
||||
"tooltip": true,
|
||||
"default": false
|
||||
},
|
||||
"followEntityOnStreamPost": {
|
||||
"type": "bool",
|
||||
@@ -187,16 +192,20 @@
|
||||
"type": "multiEnum",
|
||||
"view": "views/preferences/fields/auto-follow-entity-type-list",
|
||||
"translation": "Global.scopeNamesPlural",
|
||||
"default": [],
|
||||
"tooltip": true
|
||||
},
|
||||
"emailUseExternalClient": {
|
||||
"type": "bool"
|
||||
"type": "bool",
|
||||
"default": false
|
||||
},
|
||||
"scopeColorsDisabled": {
|
||||
"type": "bool"
|
||||
"type": "bool",
|
||||
"default": false
|
||||
},
|
||||
"tabColorsDisabled": {
|
||||
"type": "bool"
|
||||
"type": "bool",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"noDeletedAttribute": true
|
||||
|
||||
@@ -46,6 +46,7 @@ use Espo\Core\{
|
||||
Utils\Config,
|
||||
Utils\Util,
|
||||
Utils\Language,
|
||||
Utils\FieldUtil,
|
||||
};
|
||||
|
||||
use Espo\Entities\User;
|
||||
@@ -57,8 +58,24 @@ use Espo\ORM\{
|
||||
Entity,
|
||||
};
|
||||
|
||||
use StdClass;
|
||||
use Throwable;
|
||||
|
||||
class App
|
||||
{
|
||||
protected $config;
|
||||
protected $entityManager;
|
||||
protected $metadata;
|
||||
protected $acl;
|
||||
protected $aclManager;
|
||||
protected $dataManager;
|
||||
protected $selectManagerFactory;
|
||||
protected $injectableFactory;
|
||||
protected $serviceFactory;
|
||||
protected $user;
|
||||
protected $preferences;
|
||||
protected $fieldUtil;
|
||||
|
||||
public function __construct(
|
||||
Config $config,
|
||||
EntityManager $entityManager,
|
||||
@@ -70,7 +87,8 @@ class App
|
||||
InjectableFactory $injectableFactory,
|
||||
ServiceFactory $serviceFactory,
|
||||
User $user,
|
||||
Preferences $preferences
|
||||
Preferences $preferences,
|
||||
FieldUtil $fieldUtil
|
||||
) {
|
||||
$this->config = $config;
|
||||
$this->entityManager = $entityManager;
|
||||
@@ -83,12 +101,14 @@ class App
|
||||
$this->serviceFactory = $serviceFactory;
|
||||
$this->user = $user;
|
||||
$this->preferences = $preferences;
|
||||
$this->fieldUtil = $fieldUtil;
|
||||
}
|
||||
|
||||
public function getUserData()
|
||||
{
|
||||
$preferencesData = $this->preferences->getValueMap();
|
||||
unset($preferencesData->smtpPassword);
|
||||
|
||||
$this->filterPreferencesData($preferencesData);
|
||||
|
||||
$settingsService = $this->serviceFactory->create('Settings');
|
||||
|
||||
@@ -134,11 +154,16 @@ class App
|
||||
|
||||
foreach (($this->metadata->get(['app', 'appParams']) ?? []) as $paramKey => $item) {
|
||||
$className = $item['className'] ?? null;
|
||||
if (!$className) continue;
|
||||
|
||||
if (!$className) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$itemParams = $this->injectableFactory->create($className)->get();
|
||||
} catch (\Throwable $e) {
|
||||
} catch (Throwable $e) {
|
||||
$GLOBALS['log']->error("appParam {$paramKey}: " . $e->getMessage());
|
||||
|
||||
continue;
|
||||
}
|
||||
$appParams[$paramKey] = $itemParams;
|
||||
@@ -452,19 +477,41 @@ class App
|
||||
$entityTypeList = ['Contact', 'Lead'];
|
||||
|
||||
foreach ($entityTypeList as $entityType) {
|
||||
$entityList = $this->entityManager->getRepository($entityType)->where([
|
||||
'doNotCall' => true,
|
||||
'phoneNumber!=' => null,
|
||||
])->select(['id', 'phoneNumber'])->find();
|
||||
$entityList = $this->entityManager
|
||||
->getRepository($entityType)
|
||||
->where([
|
||||
'doNotCall' => true,
|
||||
'phoneNumber!=' => null,
|
||||
])
|
||||
->select(['id', 'phoneNumber'])
|
||||
->find();
|
||||
|
||||
foreach ($entityList as $entity) {
|
||||
$phoneNumber = $entity->get('phoneNumber');
|
||||
if (!$phoneNumber) continue;
|
||||
$phoneNumberEntity = $this->entityManager->getRepository('PhoneNumber')->getByNumber($phoneNumber);
|
||||
if (!$phoneNumberEntity) continue;
|
||||
$phoneNumberEntity->set('optOut', true);
|
||||
$this->entityManager->saveEntity($phoneNumberEntity);
|
||||
|
||||
if (!$phoneNumber) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$phoneNumberEntity = $this->entityManager->getRepository('PhoneNumber')->getByNumber($phoneNumber);
|
||||
|
||||
if (!$phoneNumberEntity) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$phoneNumberEntity->set('optOut', true);
|
||||
|
||||
$this->entityManager->saveEntity($phoneNumberEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function filterPreferencesData(StdClass $data)
|
||||
{
|
||||
$passwordFieldList = $this->fieldUtil->getFieldByTypeList('Preferences', 'password');
|
||||
|
||||
foreach ($passwordFieldList as $field) {
|
||||
unset($data->$field);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2550,6 +2550,10 @@ class Record implements Crud,
|
||||
->getRepository('Attachment')
|
||||
->getCopiedAttachment($attachment);
|
||||
|
||||
$attachment->set('field', $field);
|
||||
|
||||
$this->getEntityManager()->saveEntity($attachment);
|
||||
|
||||
if ($attachment) {
|
||||
$idList[] = $attachment->id;
|
||||
$nameHash->{$attachment->id} = $attachment->get('name');
|
||||
|
||||
@@ -351,7 +351,7 @@ class Xlsx
|
||||
if (array_key_exists($name.'Currency', $row) && array_key_exists($name, $row)) {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name] ? $row[$name] : '');
|
||||
|
||||
$currency = $row[$name . 'Currency'];
|
||||
$currency = $row[$name . 'Currency'] ?? $this->getConfig()->get('defaultCurrency');
|
||||
|
||||
$sheet->getStyle("$col$rowNumber")
|
||||
->getNumberFormat()
|
||||
|
||||
+239
-228
File diff suppressed because it is too large
Load Diff
@@ -219,7 +219,13 @@ define('views/admin/layouts/index', 'view', function (Dep) {
|
||||
},
|
||||
|
||||
navigate: function (scope, type) {
|
||||
this.getRouter().navigate('#Admin/layouts/scope=' + scope + '&type=' + type, {trigger: false});
|
||||
var url = '#Admin/layouts/scope=' + scope + '&type=' + type;
|
||||
|
||||
if (this.em) {
|
||||
url += '&em=true';
|
||||
}
|
||||
|
||||
this.getRouter().navigate(url, {trigger: false});
|
||||
},
|
||||
|
||||
renderDefaultPage: function () {
|
||||
|
||||
@@ -44,6 +44,8 @@ define('views/fields/enum', ['views/fields/base', 'lib!Selectize'], function (De
|
||||
|
||||
translatedOptions: null,
|
||||
|
||||
fetchEmptyValueAsNull: false,
|
||||
|
||||
searchTypeList: ['anyOf', 'noneOf', 'isEmpty', 'isNotEmpty'],
|
||||
|
||||
data: function () {
|
||||
|
||||
@@ -44,6 +44,8 @@ define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], function
|
||||
|
||||
seeMoreDisabled: true,
|
||||
|
||||
fetchEmptyValueAsNull: false,
|
||||
|
||||
setup: function () {
|
||||
Dep.prototype.setup.call(this);
|
||||
|
||||
@@ -532,6 +534,12 @@ define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], function
|
||||
data[this.name] = code;
|
||||
} else {
|
||||
data[this.name] = this.$element.val();
|
||||
|
||||
if (this.fetchEmptyValueAsNull) {
|
||||
if (!data[this.name]) {
|
||||
data[this.name] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.model.has('isHtml') && this.hasBodyPlainField) {
|
||||
|
||||
@@ -30,6 +30,8 @@ define('views/preferences/fields/signature', 'views/fields/wysiwyg', function (D
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
fetchEmptyValueAsNull: true,
|
||||
|
||||
toolbar: [
|
||||
["style", ["bold", "italic", "underline", "clear"]],
|
||||
["color", ["color"]],
|
||||
|
||||
@@ -998,7 +998,7 @@ define('views/record/list', 'view', function (Dep) {
|
||||
}, this);
|
||||
|
||||
if (
|
||||
this.getConfig().get('exportDisabled') && !this.getUser().get('isAdmin')
|
||||
this.getConfig().get('exportDisabled') && !this.getUser().isAdmin()
|
||||
||
|
||||
this.getAcl().get('exportPermission') === 'no'
|
||||
||
|
||||
|
||||
@@ -126,7 +126,9 @@ define('views/user/record/detail', 'views/record/detail', function (Dep) {
|
||||
},
|
||||
|
||||
setupNonAdminFieldsAccess: function () {
|
||||
if (this.getUser().isAdmin()) return;
|
||||
if (this.getUser().isAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var nonAdminReadOnlyFieldList = [
|
||||
'userName',
|
||||
@@ -138,9 +140,30 @@ define('views/user/record/detail', 'views/record/detail', function (Dep) {
|
||||
'portalRoles',
|
||||
'contact',
|
||||
'accounts',
|
||||
'type'
|
||||
'type',
|
||||
'emailAddress',
|
||||
];
|
||||
|
||||
nonAdminReadOnlyFieldList = nonAdminReadOnlyFieldList.filter(
|
||||
function (item) {
|
||||
if (!this.model.hasField(item)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var aclDefs = this.getMetadata().get(['entityAcl', 'User', 'fields', item]);
|
||||
|
||||
if (!aclDefs) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (aclDefs.nonAdminReadOnly) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}.bind(this),
|
||||
);
|
||||
|
||||
nonAdminReadOnlyFieldList.forEach(function (field) {
|
||||
this.setFieldReadOnly(field, true);
|
||||
}, this);
|
||||
|
||||
@@ -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)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+1484
-764
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "6.0.4",
|
||||
"version": "6.0.7",
|
||||
"description": "",
|
||||
"main": "index.php",
|
||||
"repository": {
|
||||
@@ -12,21 +12,21 @@
|
||||
"devDependencies": {
|
||||
"archiver": "^3.1.1",
|
||||
"fstream": ">=1.0.12",
|
||||
"grunt": "^1.0.4",
|
||||
"grunt": "^1.3.0",
|
||||
"grunt-chmod": "~1.1.0",
|
||||
"grunt-contrib-clean": "~2.0.0",
|
||||
"grunt-contrib-concat": "~1.0.1",
|
||||
"grunt-contrib-copy": "~1.0.0",
|
||||
"grunt-contrib-cssmin": "~3.0.0",
|
||||
"grunt-contrib-less": "~2.0.0",
|
||||
"grunt-contrib-less": "^2.0.0",
|
||||
"grunt-contrib-uglify": "~4.0.0",
|
||||
"grunt-mkdir": "~1.0.0",
|
||||
"grunt-replace": "~1.0.1",
|
||||
"js-yaml": "^3.13.1",
|
||||
"lodash": "^4.17.19",
|
||||
"lodash": "^4.17.20",
|
||||
"minimist": ">=1.2.2",
|
||||
"pofile": "~1.0.11",
|
||||
"tar": "^4.4.8"
|
||||
"tar": "^6.0.5"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
||||
@@ -86,12 +86,12 @@ class SystemTest extends \PHPUnit\Framework\TestCase
|
||||
$this->assertEquals($rootDir, $this->object->getRootDir());
|
||||
}
|
||||
|
||||
public function testGetPhpBin()
|
||||
public function testGetPhpBinary()
|
||||
{
|
||||
$phpBin = @exec('which php');
|
||||
$phpBinary = (new \Symfony\Component\Process\PhpExecutableFinder)->find();
|
||||
|
||||
if (isset($phpBin)) {
|
||||
$this->assertEquals($phpBin, $this->object->getPhpBin());
|
||||
if (isset($phpBinary)) {
|
||||
$this->assertEquals($phpBinary, $this->object->getPhpBinary());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user