diff --git a/apps/maarch_entreprise/actions/process.php b/apps/maarch_entreprise/actions/process.php index 7165b9d5a6ef340ec55229f8e1141426642a16ae..dffab964d9c3daafad5e91dab1fad61ea77336f9 100755 --- a/apps/maarch_entreprise/actions/process.php +++ b/apps/maarch_entreprise/actions/process.php @@ -743,9 +743,16 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module $frm_str .='</div>'; //RESOURCE FRAME + + if($data['category_id']['value'] == "outgoing"){ + $watermark_outgoing = "true"; + } else { + $watermark_outgoing = "false"; + } + $frm_str .= '<iframe src="' . $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=indexing_searching&page=view_resource_controler&id=' - . $res_id . '&watermark_outgoing=true" name="viewframe" id="viewframe" scrolling="auto" frameborder="0" width="100%" style="width:100% !important;"></iframe>'; + . $res_id . '&watermark_outgoing='.$watermark_outgoing.'" name="viewframe" id="viewframe" scrolling="auto" frameborder="0" width="100%" style="width:100% !important;"></iframe>'; $frm_str .= '</div>'; diff --git a/apps/maarch_entreprise/indexing_searching/watermark.php b/apps/maarch_entreprise/indexing_searching/watermark.php index 7dd63638e2f7ca3d477756af156f0beac115624b..a176abb6723e27ceb4fd71e10131193617b8205b 100755 --- a/apps/maarch_entreprise/indexing_searching/watermark.php +++ b/apps/maarch_entreprise/indexing_searching/watermark.php @@ -58,10 +58,17 @@ if ($watermarkTab['text'] == '') { } elseif ($matches[1][$z] == 'hour_now') { $currentText = date('H:m:i'); } elseif($matches[1][$z] == 'alt_identifier'){ + + if($_REQUEST['watermark_outgoing'] == "true"){ + $res_id = $_REQUEST['res_id_master']; + } else { + $res_id = $s_id; + } + $dbView = new Database(); $query = " select " . $matches[1][$z] . " as thecolumn from mlb_coll_ext where res_id = ?"; - $stmt = $dbView->query($query, array($_REQUEST['res_id_master'])); + $stmt = $dbView->query($query, array($res_id)); $returnQuery = $stmt->fetchObject(); $currentText = $returnQuery->thecolumn; } else { diff --git a/apps/maarch_entreprise/xml/IVS/validation_rules.xml b/apps/maarch_entreprise/xml/IVS/validation_rules.xml index ca1b5456e1c1b71582d57e1d483da2132df43792..664f247a097ab5018b9dfe56c241db90d27d5c7d 100755 --- a/apps/maarch_entreprise/xml/IVS/validation_rules.xml +++ b/apps/maarch_entreprise/xml/IVS/validation_rules.xml @@ -513,6 +513,7 @@ <parameter name="aVersion" type="boolean" /> <parameter name="dir" type="identifier" /> <parameter name="editingMode" type="string" /> + <parameter name="watermark_outgoing" type="string" /> </validationRule> <validationRule name="multi_contacts" extends="standardForm" mode="error"> diff --git a/modules/attachments/xml/IVS/validation_rules.xml b/modules/attachments/xml/IVS/validation_rules.xml index bf273bf765baaef1489b47291a7b43810861a062..2394fd843c1e8a18c1630f3b151ce914cc924bf5 100755 --- a/modules/attachments/xml/IVS/validation_rules.xml +++ b/modules/attachments/xml/IVS/validation_rules.xml @@ -81,6 +81,7 @@ <parameter name="res_id_master" type="integer" /> <parameter name="id" type="identifier" /> <parameter name="editingMode" type="string" /> + <parameter name="watermark_outgoing" type="string" /> </validationRule> </validationRules>