From 2cdf621b755e260b6026398ab258020ce56ec4fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Fri, 5 Jul 2013 14:55:24 +0200 Subject: [PATCH] New: Provide relativepath as parameter --- htdocs/core/class/html.formfile.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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.= "<tr ".$bc[$var].">"; // Show file name with link to download @@ -533,7 +533,11 @@ class FormFile $out.= ($param?'&'.$param:''); $out.= '">'.img_printer().'</a></td>'; } - 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.= '</tr>'; -- GitLab