From dafa7d2ab967bd9ce3944d1739a5442b245f9b7f Mon Sep 17 00:00:00 2001
From: Nestor <npegane@hotmail.com>
Date: Wed, 2 May 2018 17:58:04 +0200
Subject: [PATCH] FEAT #7372 every entity columns in template fields

---
 modules/templates/datasources/letterbox_attachment.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/templates/datasources/letterbox_attachment.php b/modules/templates/datasources/letterbox_attachment.php
index 7f3e37031ad..60efb02e938 100755
--- a/modules/templates/datasources/letterbox_attachment.php
+++ b/modules/templates/datasources/letterbox_attachment.php
@@ -36,8 +36,7 @@ if (!empty($res_id)) {
     $doc['nature_id'] = $_SESSION['mail_natures'][$doc['nature_id']];
 
     //INITIATOR INFO OF DOCUMENT
-    $stmt2 = $dbDatasource->query('SELECT a.entity_id as entity_id, a.entity_label as entity_label, a.parent_entity_id as parent_entity_id,
-    b.entity_label as parent_entity_label, a.short_label as short_label, a.email as email, a.entity_type as entity_type, a.entity_path as entity_path
+    $stmt2 = $dbDatasource->query('SELECT a.*, b.entity_label as parent_entity_label
     FROM entities as a, entities as b
     WHERE a.entity_id = ?
     AND a.parent_entity_id = b.entity_id', array($doc['initiator']));
-- 
GitLab