chore: Update copyright year from 2025 to 2026 across core files

- Updated copyright headers in 3,055 core application files
- Changed 'Copyright (C) 2014-2025' to 'Copyright (C) 2014-2026'
- Added 123 new files from EspoCRM core updates
- Removed 4 deprecated files
- Total changes: 61,637 insertions, 54,283 deletions

This is a routine maintenance update for the new year 2026.
This commit is contained in:
2026-02-07 16:05:21 +01:00
parent 6a8a4a2882
commit 127fa6503b
6468 changed files with 564781 additions and 31179 deletions

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
@@ -39,6 +39,7 @@ use Espo\Core\Exceptions\NotFoundSilent;
use Espo\Core\Utils\SystemUser;
use Espo\Entities\User;
use GuzzleHttp\Psr7\Utils;
use LasseRafn\InitialAvatarGenerator\InitialAvatar;
use LasseRafn\StringScript;
@@ -202,7 +203,11 @@ class Avatar extends Image
->setHeader('Content-Type', 'image/png')
->setHeader('Etag', $etag);
$response->writeBody($image->stream('png', 100));
$pointer = $image->toPng()->toFilePointer();
$stream = Utils::streamFor($pointer);
$response->writeBody($stream);
}
private function composeCacheControlHeader(): string

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
@@ -391,7 +391,7 @@ class Image implements EntryPoint
$orientation = $this->getOrientation($filePath);
if ($orientation) {
$angle = [0, 0, 0, 180, 0, 0, -90, 0, 90][$orientation];
$angle = [0, 0, 0, 180, 0, 0, -90, 0, 90][$orientation] ?? 0;
$targetImage = imagerotate($targetImage, $angle, 0) ?: $targetImage;
}

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
@@ -38,6 +38,7 @@ use Espo\Core\Name\Field;
use Espo\Core\ORM\EntityManager;
use Espo\Core\Utils\Util;
use Espo\Entities\Template;
use Espo\ORM\Entity;
use Espo\Tools\Pdf\Service;
class Pdf implements EntryPoint
@@ -69,11 +70,9 @@ class Pdf implements EntryPoint
throw new NotFound("Template not found.");
}
$contents = $this->service->generate($entityType, $entityId, $templateId);
$result = $this->service->generate($entityType, $entityId, $templateId);
$fileName = Util::sanitizeFileName($entity->get(Field::NAME) ?? 'unnamed');
$fileName = $fileName . '.pdf';
$fileName = $result->getFilename() ?? $this->composeFileName($entity);
$response
->setHeader('Content-Type', 'application/pdf')
@@ -83,9 +82,16 @@ class Pdf implements EntryPoint
->setHeader('Content-Disposition', 'inline; filename="' . basename($fileName) . '"');
if (!$request->getServerParam('HTTP_ACCEPT_ENCODING')) {
$response->setHeader('Content-Length', (string) $contents->getStream()->getSize());
$response->setHeader('Content-Length', (string) $result->getStream()->getSize());
}
$response->writeBody($contents->getStream());
$response->writeBody($result->getStream());
}
private function composeFileName(Entity $entity): string
{
$defaultName = $entity->get(Field::NAME) ?? $entity->getId();
return Util::sanitizeFileName($defaultName) . '.pdf';
}
}