diff --git a/modules/attachments/load_toolbar_attachments.php b/modules/attachments/load_toolbar_attachments.php index d4207fe8edb1cc373a7ef48495df489bbef50cff..cf60b0f83011d418bd4332fa5d6a21b4a80fb231 100644 --- a/modules/attachments/load_toolbar_attachments.php +++ b/modules/attachments/load_toolbar_attachments.php @@ -11,11 +11,11 @@ if($_SESSION['req'] == 'details'){ if(isset($_REQUEST['responses'])){ $stmt = $db->query("SELECT res_id, creation_date, title, format FROM " . $_SESSION['tablename']['attach_res_attachments'] - . " WHERE res_id_master = ? and coll_id = ? and status <> 'DEL' and (attachment_type = 'response_project' or attachment_type = 'outgoing_mail_signed' or attachment_type = 'outgoing_mail' or attachment_type = 'signed_response') and (status <> 'TMP' or (typist = ? and status = 'TMP'))", array($res_id, $coll_id, $_SESSION['user']['UserId'])); + . " WHERE res_id_master = ? and coll_id = ? and status <> 'DEL' and (attachment_type = 'response_project' or attachment_type = 'outgoing_mail_signed' or attachment_type = 'outgoing_mail' or attachment_type = 'signed_response' or attachment_type = 'aihp') and (status <> 'TMP' or (typist = ? and status = 'TMP'))", array($res_id, $coll_id, $_SESSION['user']['UserId'])); }else{ $stmt = $db->query("SELECT res_id, creation_date, title, format FROM " . $_SESSION['tablename']['attach_res_attachments'] - . " WHERE res_id_master = ? and coll_id = ? and status <> 'DEL' and attachment_type NOT IN ('response_project','signed_response','outgoing_mail_signed','converted_pdf','outgoing_mail','print_folder') and (status <> 'TMP' or (typist = ? and status = 'TMP'))", array($res_id, $coll_id, $_SESSION['user']['UserId'])); + . " WHERE res_id_master = ? and coll_id = ? and status <> 'DEL' and attachment_type NOT IN ('response_project','signed_response','outgoing_mail_signed','converted_pdf','outgoing_mail','print_folder','aihp') and (status <> 'TMP' or (typist = ? and status = 'TMP'))", array($res_id, $coll_id, $_SESSION['user']['UserId'])); } }else{