From eeda176ed65bd6bbcdd7d8bc139c082abfc8b920 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Sep 2018 15:13:18 +0200 Subject: [PATCH] FIX Bad position of hook formattachOptions call --- htdocs/core/class/html.formfile.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index f9fc04d47de..4a59e28f044 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -185,7 +185,7 @@ class FormFile if ($linkfiles) { - $out .= "\n\n"; + $out .= "\n\n"; $langs->load('link'); $title = $langs->trans("LinkANewFile"); $out .= load_fiche_titre($title, null, null); @@ -213,19 +213,18 @@ class FormFile $out .= ''; $out .= '
'; $out .= '
'; - $parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url, 'perm'=>$perm); - $res = $hookmanager->executeHooks('formattachOptions',$parameters,$object); - $out .= "\n\n"; + $out .= "\n\n"; } + $parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''), 'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url, 'perm'=>$perm); + $res = $hookmanager->executeHooks('formattachOptions',$parameters,$object); if (empty($res)) { print '
'; print $out; print '
'; } - print $hookmanager->resPrint; return 1;