Compare commits
2 Commits
752969ec39
...
6696f3f3c2
| Author | SHA1 | Date | |
|---|---|---|---|
| 6696f3f3c2 | |||
| 22ac828747 |
@@ -3,16 +3,16 @@
|
|||||||
namespace Espo\Custom\Hooks\CDokumente;
|
namespace Espo\Custom\Hooks\CDokumente;
|
||||||
|
|
||||||
use Espo\ORM\Entity;
|
use Espo\ORM\Entity;
|
||||||
use Espo\Core\Utils\Util;
|
|
||||||
|
|
||||||
class CDokumente extends \Espo\Core\Hooks\Base
|
class CDokumente extends \Espo\Core\Hooks\Base
|
||||||
{
|
{
|
||||||
public function beforeSave(Entity $entity, array $options = [])
|
public function beforeSave(Entity $entity, array $options = [])
|
||||||
{
|
{
|
||||||
// Nur berechnen, wenn die Datei geändert wurde oder neu
|
// Problem: isAttributeChanged('dokument') erkennt Datei-Änderungen nicht,
|
||||||
if (!$entity->isNew() && !$entity->isAttributeChanged('dokument')) {
|
// da EspoCRM Datei-Uploads nicht als Feld-Änderung markiert.
|
||||||
return;
|
// Daher läuft der Hook bei jeder beforeSave mit dokument-Feld,
|
||||||
}
|
// um sicherzustellen, dass Hashes bei Datei-Änderungen berechnet werden.
|
||||||
|
// Optimierung wäre wünschenswert, aber nicht möglich mit aktueller API.
|
||||||
|
|
||||||
$dokument = $entity->get('dokument');
|
$dokument = $entity->get('dokument');
|
||||||
|
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ return [
|
|||||||
0 => 'youtube.com',
|
0 => 'youtube.com',
|
||||||
1 => 'google.com'
|
1 => 'google.com'
|
||||||
],
|
],
|
||||||
'microtime' => 1772522649.082819,
|
'microtime' => 1772522818.173883,
|
||||||
'siteUrl' => 'https://crm.bitbylaw.com',
|
'siteUrl' => 'https://crm.bitbylaw.com',
|
||||||
'fullTextSearchMinLength' => 4,
|
'fullTextSearchMinLength' => 4,
|
||||||
'webSocketUrl' => 'ws://api.bitbylaw.com:5000/espocrm/ws',
|
'webSocketUrl' => 'ws://api.bitbylaw.com:5000/espocrm/ws',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'cacheTimestamp' => 1772522650,
|
'cacheTimestamp' => 1772528140,
|
||||||
'microtimeState' => 1772522650.587721,
|
'microtimeState' => 1772528140.645177,
|
||||||
'currencyRates' => [
|
'currencyRates' => [
|
||||||
'EUR' => 1.0
|
'EUR' => 1.0
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user