diff --git a/modules/templates/datasources/letterbox_attachment.php b/modules/templates/datasources/letterbox_attachment.php index 01f371600cd6448d1b2201dc61c995ee361841e9..6912de1af2f1b85acd33c3d43928d7f1e0d73f06 100644 --- a/modules/templates/datasources/letterbox_attachment.php +++ b/modules/templates/datasources/letterbox_attachment.php @@ -31,6 +31,11 @@ $doc['category_id'] = html_entity_decode($_SESSION['coll_categories']['letterbox $doc['nature_id'] = $_SESSION['mail_natures'][$doc['nature_id']]; +$stmt2 = $dbDatasource->query("SELECT entity_label FROM entities WHERE entity_id = ? ", array($doc['initiator'])); +$initiator = $stmt2->fetch(PDO::FETCH_ASSOC); + +$doc['initiator'] = $initiator['entity_label']; + $datasources['res_letterbox'][] = $doc; diff --git a/modules/templates/datasources/letterbox_events.php b/modules/templates/datasources/letterbox_events.php index 582383c0385723d842ba70ed4c5c51931d88661f..dc09dce34738be47aea58f7542ca80d4eeabb37e 100644 --- a/modules/templates/datasources/letterbox_events.php +++ b/modules/templates/datasources/letterbox_events.php @@ -77,12 +77,16 @@ foreach($events as $event) { $stmt = $dbDatasource->query($query, $arrayPDO); $res = $stmt->fetch(PDO::FETCH_ASSOC); - // Lien vers la page détail + // Lien vers la page d�tail $urlToApp = str_replace('//', '/', $maarchUrl . '/apps/' . $maarchApps . '/index.php?'); $res['linktodoc'] = $urlToApp . 'display=true&page=view_resource_controler&dir=indexing_searching&id=' . $res['res_id']; $res['linktodetail'] = $urlToApp . 'page=details&dir=indexing_searching&id=' . $res['res_id']; $res['linktoprocess'] = $urlToApp . 'page=view_baskets&module=basket&baskets=MyBasket&directLinkToAction&resid=' . $res['res_id']; + $stmt2 = $dbDatasource->query("SELECT entity_label FROM entities WHERE entity_id = ? ", array($res['initiator'])); + $initiator = $stmt2->fetch(PDO::FETCH_ASSOC); + $res['initiator'] = $initiator['entity_label']; + // Insertion $datasources['res_letterbox'][] = $res;