From d7ed897564b4852150fb12fa28d0af05aca4bf1f Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Wed, 29 Jan 2020 22:37:27 +0100
Subject: [PATCH] FEAT #12346 TIME 0:15 do not create thumbnail in
 migrateOutgoingAttachment

---
 .../20.03/migrateOutgoingAttachments.php      | 35 -------------------
 1 file changed, 35 deletions(-)

diff --git a/migration/20.03/migrateOutgoingAttachments.php b/migration/20.03/migrateOutgoingAttachments.php
index a15cb93ce4e..9643c585f6d 100644
--- a/migration/20.03/migrateOutgoingAttachments.php
+++ b/migration/20.03/migrateOutgoingAttachments.php
@@ -93,24 +93,6 @@ foreach ($customs as $custom) {
                 'version'       => $attachmentInfo['relation'],
                 'fingerprint'   => $convertedDocument[0]['fingerprint']
             ]);
-
-            $thumbnailDocument = \SrcCore\models\DatabaseModel::select([
-                'select'    => ['docserver_id','path', 'filename', 'fingerprint'],
-                'table'     => ['adr_attachments'],
-                'where'     => ['res_id = ?', 'type = ?'],
-                'data'      => [$attachmentInfo['res_id'], 'TNL'],
-            ]);
-            if (!empty($thumbnailDocument)) {
-                AdrModel::createDocumentAdr([
-                    'resId'         => $attachmentInfo['res_id_master'],
-                    'type'          => 'TNL',
-                    'docserverId'   => $thumbnailDocument[0]['docserver_id'],
-                    'path'          => $thumbnailDocument[0]['path'],
-                    'filename'      => $thumbnailDocument[0]['filename'],
-                    'version'       => $attachmentInfo['relation'],
-                    'fingerprint'   => $thumbnailDocument[0]['fingerprint']
-                ]);
-            }
     
             $attachmentToDelete[] = $attachmentInfo['res_id'];
             $customId = empty($custom) ? 'null' : $custom;
@@ -129,23 +111,6 @@ foreach ($customs as $custom) {
                     $attachmentVersion[0]['adrType'] = 'PDF';
                     $attachmentVersion[0]['relation'] = $attachmentVersion['relation'];
                     addOutgoingMailSignedInAdr($attachmentVersion[0]);
-                    $thumbnailDocument = \SrcCore\models\DatabaseModel::select([
-                        'select'    => ['docserver_id','path', 'filename', 'fingerprint'],
-                        'table'     => ['adr_attachments'],
-                        'where'     => ['res_id = ?', 'type = ?'],
-                        'data'      => [$attachmentVersion['res_id'], 'TNL'],
-                    ]);
-                    if (!empty($thumbnailDocument)) {
-                        AdrModel::createDocumentAdr([
-                            'resId'         => $attachmentInfo['res_id_master'],
-                            'type'          => 'TNL',
-                            'docserverId'   => $thumbnailDocument[0]['docserver_id'],
-                            'path'          => $thumbnailDocument[0]['path'],
-                            'filename'      => $thumbnailDocument[0]['filename'],
-                            'version'       => $attachmentVersion['relation'],
-                            'fingerprint'   => $thumbnailDocument[0]['fingerprint']
-                        ]);
-                    }
                     $attachmentToDelete[] = $attachmentVersion['res_id'];
                 }
             }
-- 
GitLab