Skip to content
Snippets Groups Projects
Verified Commit 1a07754c authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX document linked

parent 8c52321c
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ if (!empty($_REQUEST['id'])) {
$_SESSION['doc_id'] = $_REQUEST['id'];
}
$security = new security();
$right = $security->test_right_doc($_SESSION['collection_id_choice'], $_SESSION['doc_id']);
$right = $security->test_right_doc('letterbox_coll', $_SESSION['doc_id']);
if (!$right) {
exit(_NO_RIGHT_TXT);
......@@ -24,26 +24,36 @@ $Class_LinkController = new LinkController();
$frm_str .= '<div id="loadLinks">';
$nbLinkDesc = $Class_LinkController->nbDirectLink(
$_SESSION['doc_id'], $_SESSION['collection_id_choice'], 'desc'
$_SESSION['doc_id'],
'letterbox_coll',
'desc'
);
if ($nbLinkDesc > 0) {
$frm_str .= '<i class="fa fa-long-arrow-alt-right fa-2x"></i>';
$frm_str .= $Class_LinkController->formatMap(
$Class_LinkController->getMap(
$_SESSION['doc_id'], $_SESSION['collection_id_choice'], 'desc'
), 'desc'
$_SESSION['doc_id'],
'letterbox_coll',
'desc'
),
'desc'
);
$frm_str .= '<br />';
}
$nbLinkAsc = $Class_LinkController->nbDirectLink(
$_SESSION['doc_id'], $_SESSION['collection_id_choice'], 'asc'
$_SESSION['doc_id'],
'letterbox_coll',
'asc'
);
if ($nbLinkAsc > 0) {
$frm_str .= '<i class="fa fa-long-arrow-alt-left fa-2x"></i>';
$frm_str .= $Class_LinkController->formatMap(
$Class_LinkController->getMap(
$_SESSION['doc_id'], $_SESSION['collection_id_choice'], 'asc'
), 'asc'
$_SESSION['doc_id'],
'letterbox_coll',
'asc'
),
'asc'
);
$frm_str .= '<br />';
}
......
......@@ -32,7 +32,7 @@ class LinkController
foreach ($arrayToFormat as $key => $value) {
//GET RES INFOS
$infos = get_general_data($_SESSION['current_basket']['coll_id'], $key, 'full');
$infos = get_general_data('letterbox_coll', $key, 'full');
$stmt = $db->query('SELECT dest_user, status FROM res_letterbox WHERE res_id = ?', array($key));
$otherInfos = $stmt->fetchObject();
$chronoNumber = $this->getAltIdentifier($key);
......@@ -129,13 +129,8 @@ class LinkController
$return .= '\''.$delParent.'\' ,';
$return .= '\'del\',';
if ($_SESSION['current_basket']['coll_id'] == 'letterbox_coll') {
$return .= '\'res_view_letterbox\'';
} elseif ($_SESSION['current_basket']['coll_id'] == 'business_coll') {
$return .= '\'res_view_business\'';
} else {
$return .= '\'\'';
}
$return .= '\'res_view_letterbox\'';
$return .= ');}';
$return .= '">';
$return .= '<i class="fa fa-unlink fa-2x" title="'._DEL_LINK.'" style="cursor:pointer;"></i>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment