diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 84946405a93..8f725368f9c 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1,5 +1,5 @@ +/* Copyright (c) 2008-2013 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin * Copyright (c) 2010 Juanjo Menent * @@ -142,10 +142,11 @@ class FormFile $out .= "\n\n\n"; $parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url); $res = $hookmanager->executeHooks('formattachOptions',$parameters,$object); - if(!$res) { - echo $out; - } - echo $hookmanager->resPrint; + if (empty($res)) + { + print $out; + } + print $hookmanager->resprint; return 1; } @@ -502,7 +503,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 @@ -540,7 +541,7 @@ class FormFile $out.= ($param?'&'.$param:''); $out.= '">'.img_printer().''; } - if (is_object($hookmanager)) + if (is_object($hookmanager)) { $parameters=array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''),'modulepart'=>$modulepart,'relativepath'=>$relativepath); $res = $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);