Compare commits

...

11 Commits
7.5.3 ... 7.5.6

Author SHA1 Message Date
Yuri Kuznetsov
9b788c3c2d 7.5.6 2023-08-27 15:27:44 +03:00
Yuri Kuznetsov
17e487d011 update spatie 2023-08-27 15:19:58 +03:00
Yuri Kuznetsov
3c64db25b9 portal entry point client fix 2023-08-15 19:14:47 +03:00
Arkadiy Asuratov
7af819a656 fix uuid matching in handlePostText (#2824) 2023-08-12 11:10:35 +03:00
Yuri Kuznetsov
275ee96750 fix id autoincrement conversion to varchar 2023-06-28 16:52:53 +03:00
Yuri Kuznetsov
b66cb676a1 7.5.5 2023-06-28 12:47:42 +03:00
Yuri Kuznetsov
975b7b72c3 dont apply default encoding 2023-06-28 12:31:13 +03:00
Yuri Kuznetsov
2dfd14f3c5 fix follower list 2023-06-23 23:25:32 +03:00
Yuri Kuznetsov
caf6217b9a fix currency validation 2023-06-22 14:17:23 +03:00
Yuri Kuznetsov
8ef2ed4144 7.5.4 2023-06-22 09:35:19 +03:00
Yuri Kuznetsov
befec82120 fix history 2023-06-22 09:27:11 +03:00
13 changed files with 64 additions and 23 deletions

View File

@@ -115,6 +115,14 @@ class CurrencyType extends FloatType
$currency = $entity->get($attribute);
$currencyList = $this->config->get('currencyList') ?? [$this->config->get('defaultCurrency')];
if (
$currency === null &&
!$entity->has($field) &&
$entity->isNew()
) {
return true;
}
if (
$currency === null &&
$entity->has($field) &&

View File

@@ -40,6 +40,7 @@ use Espo\Core\Api\ErrorOutput;
use Espo\Core\Api\RequestWrapper;
use Espo\Core\Api\ResponseWrapper;
use Espo\Core\Api\AuthBuilderFactory;
use Espo\Core\Portal\Utils\Url;
use Espo\Core\Utils\Route;
use Espo\Core\Utils\ClientManager;
use Espo\Core\ApplicationRunners\EntryPoint as EntryPointRunner;
@@ -87,6 +88,14 @@ class Starter
throw new BadRequest("No 'entryPoint' param.");
}
$portalId = Url::getPortalIdFromEnv();
if ($portalId && !$final) {
$this->runThroughPortal($portalId, $entryPoint);
return;
}
$responseWrapped = new ResponseWrapper(new Response());
try {
@@ -206,7 +215,11 @@ class Starter
{
$app = new PortalApplication($portalId);
$app->setClientBasePath($this->clientManager->getBasePath());
$clientManager = $app->getContainer()
->getByClass(ClientManager::class);
$clientManager->setBasePath($this->clientManager->getBasePath());
$clientManager->setApiUrl('api/v1/portal-access/' . $portalId);
$params = RunnerParams::fromArray([
'entryPoint' => $entryPoint,

View File

@@ -37,7 +37,6 @@ use RuntimeException;
class DatabaseParamsFactory
{
private const DEFAULT_PLATFORM = 'Mysql';
private const DEFAULT_CHARSET = 'utf8';
public function __construct(private Config $config) {}
@@ -55,7 +54,7 @@ class DatabaseParamsFactory
->withName($config->get('database.dbname'))
->withUsername($config->get('database.user'))
->withPassword($config->get('database.password'))
->withCharset($config->get('database.charset') ?? self::DEFAULT_CHARSET)
->withCharset($config->get('database.charset'))
->withPlatform($config->get('database.platform'))
->withSslCa($config->get('database.sslCA'))
->withSslCert($config->get('database.sslCert'))

View File

@@ -47,9 +47,14 @@ class Url
return explode('/', $url)[count(explode('/', $scriptNameModified)) - 1] ?? null;
}
public static function getPortalIdFromEnv(): ?string
{
return $_SERVER['ESPO_PORTAL_ID'] ?? null;
}
public static function detectPortalId(): ?string
{
$portalId = $_SERVER['ESPO_PORTAL_ID'] ?? null;
$portalId = self::getPortalIdFromEnv();
if ($portalId) {
return $portalId;

View File

@@ -46,6 +46,7 @@ class ClientManager
protected string $runScript = "app.start();";
private string $basePath = '';
private string $libsConfigPath = 'client/cfg/libs.json';
private string $apiUrl = 'api/v1';
private string $nonce;
@@ -233,7 +234,7 @@ class ClientManager
$data = [
'applicationId' => 'espocrm-application-id',
'apiUrl' => 'api/v1',
'apiUrl' => $this->apiUrl,
'applicationName' => $this->config->get('applicationName', 'EspoCRM'),
'cacheTimestamp' => $cacheTimestamp,
'loaderCacheTimestamp' => $loaderCacheTimestamp,
@@ -293,4 +294,9 @@ class ClientManager
{
return $this->devModeJsFileListProvider->get();
}
public function setApiUrl(string $apiUrl): void
{
$this->apiUrl = $apiUrl;
}
}

View File

@@ -264,6 +264,10 @@ class DiffModifier
->setNotnull(false)
->setDefault(null);
if ($name === 'id') {
$column->setNotnull(true);
}
self::unsetChangedColumnProperty($tableDiff, $columnDiff, $name, 'autoincrement');
return true;

View File

@@ -216,7 +216,7 @@ class Note extends Record
$siteUrl = $this->config->getSiteUrl();
$regexp = '/' . preg_quote($siteUrl, '/') .
'(\/portal|\/portal\/[a-zA-Z0-9]*)?\/#([A-Z][a-zA-Z0-9]*)\/view\/([a-zA-Z0-9]*)/';
'(\/portal|\/portal\/[a-zA-Z0-9]*)?\/#([A-Z][a-zA-Z0-9]*)\/view\/([a-zA-Z0-9-]*)/';
$post = preg_replace($regexp, '[\2/\3](#\2/view/\3)', $post);

View File

@@ -35,6 +35,8 @@ use Espo\Core\Record\ServiceContainer as RecordServiceContainer;
use Espo\Core\Utils\SystemUser;
use Espo\Entities\Subscription;
use Espo\Modules\Crm\Entities\Account;
use Espo\ORM\Query\Part\Expression as Expr;
use Espo\ORM\Query\Part\Order;
use Espo\Repositories\EmailAddress as EmailAddressRepository;
use Espo\ORM\Entity;
@@ -1103,7 +1105,10 @@ class Service
->buildQueryBuilder();
if (!$searchParams->getOrderBy()) {
$builder->order('LIST:id:' . $this->user->getId(), 'DESC');
$builder->order([]);
$builder->order(
Order::createByPositionInList(Expr::column('id'), [$this->user->getId()])
);
$builder->order('name');
}
@@ -1168,10 +1173,10 @@ class Service
->where([
'isActive' => true,
])
->order([
['LIST:id:' . $this->user->getId(), 'DESC'],
['name'],
])
->order(
Order::createByPositionInList(Expr::column('id'), [$this->user->getId()])
)
->order('name')
->find();
$data = [

View File

@@ -37,7 +37,8 @@ define('views/event/fields/name-for-history', ['views/fields/varchar'], function
let status = this.model.get('status');
let canceledStatusList = this.getMetadata().get(['scopes', this.model.entityType, 'canceledStatusList']);
let canceledStatusList = this.getMetadata()
.get(['scopes', this.model.entityType, 'canceledStatusList']) || [];
data.strikethrough = canceledStatusList.includes(status);

View File

@@ -30,7 +30,7 @@
"yzalis/identicon": "*",
"zordius/lightncandy": "dev-espo#v1.2.5e",
"composer/semver": "^3",
"spatie/async": "1.5.5",
"spatie/async": "1.5.6",
"tecnickcom/tcpdf": "6.3.5",
"symfony/process": "4.4.*",
"symfony/http-foundation": "4.4.*",

14
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a5da894e2eec9f396d3f1ea9ec7f2251",
"content-hash": "5940278db62a149dd58d48975ac8525e",
"packages": [
{
"name": "async-aws/core",
@@ -4416,16 +4416,16 @@
},
{
"name": "spatie/async",
"version": "1.5.5",
"version": "1.5.6",
"source": {
"type": "git",
"url": "https://github.com/spatie/async.git",
"reference": "742708736b1e6d606dd1cd0f60acb7e354211e41"
"reference": "24a8ffa98f4fe0f9dc5daef3bab02a65729fe23b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/async/zipball/742708736b1e6d606dd1cd0f60acb7e354211e41",
"reference": "742708736b1e6d606dd1cd0f60acb7e354211e41",
"url": "https://api.github.com/repos/spatie/async/zipball/24a8ffa98f4fe0f9dc5daef3bab02a65729fe23b",
"reference": "24a8ffa98f4fe0f9dc5daef3bab02a65729fe23b",
"shasum": ""
},
"require": {
@@ -4471,7 +4471,7 @@
],
"support": {
"issues": "https://github.com/spatie/async/issues",
"source": "https://github.com/spatie/async/tree/1.5.5"
"source": "https://github.com/spatie/async/tree/1.5.6"
},
"funding": [
{
@@ -4479,7 +4479,7 @@
"type": "github"
}
],
"time": "2022-06-21T06:40:45+00:00"
"time": "2023-08-25T15:47:03+00:00"
},
{
"name": "symfony/deprecation-contracts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "espocrm",
"version": "7.5.3",
"version": "7.5.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "espocrm",
"version": "7.5.3",
"version": "7.5.6",
"hasInstallScript": true,
"license": "GPL-3.0",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "7.5.3",
"version": "7.5.6",
"description": "Open-source CRM.",
"repository": {
"type": "git",