diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 0d2e3163be6..9368864c7d0 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -495,7 +495,7 @@ class FormFile
// Autre cas
if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; }
if ($modulepart == 'export') { $relativepath = $file["name"]; }
-
+
$out.= "
";
// Show file name with link to download
@@ -533,7 +533,11 @@ class FormFile
$out.= ($param?'&'.$param:'');
$out.= '">'.img_printer().'';
}
- if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);
+ if (is_object($hookmanager))
+ {
+ $parameters=array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''),'modulepart'=>$modulepart,'relativepath'=>$relativepath);
+ $out.= $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);
+ }
}
$out.= '
';