diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 1319ad766d0..5317d49c23c 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -764,8 +764,9 @@ class FormFile if (empty($relativepath)) { $relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/'; - if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath; - if ($object->element == 'member') $relativepath=get_exdir($object->id,2).$relativepath; + if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath; // TODO Call using a defined value for $relativepath + if ($object->element == 'member') $relativepath=get_exdir($object->id,2).$relativepath; // TODO Call using a defined value for $relativepath + if ($object->element == 'project_task') $relativepath='Call_not_supported_._Call_function_using_a_defined_relative_path_.'; } $var=!$var; @@ -1052,9 +1053,10 @@ class FormFile * @param int $permtodelete Deletion is allowed * @param string $action Action * @param string $selected ??? + * @param string $param More param to add into URL * @return int Number of links */ - public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null) + public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null, $param='') { global $user, $conf, $langs, $user; global $bc; @@ -1071,17 +1073,17 @@ class FormFile $sortfield = null; } $res = $link->fetchAll($links, $object->element, $object->id, $sortfield, $sortorder); - $param = (isset($object->id)?'&id=' . $object->id : ''); + $param .= (isset($object->id)?'&id=' . $object->id : ''); // Show list of associated links print_titre($langs->trans("LinkedFiles")); - print '