New: Provide relativepath as parameter

This commit is contained in:
Laurent Destailleur 2013-07-05 14:55:24 +02:00
parent 529a58cc9d
commit 2cdf621b75

View File

@ -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>';