Just use print instead of echo, just because echo is not use anuwhere

else.
This commit is contained in:
Laurent Destailleur 2013-07-10 15:45:16 +02:00
parent 7ee23a9612
commit 57dbf87d0a

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (c) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (c) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (c) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (c) 2010 Juanjo Menent <jmenent@2byte.es>
* *
@ -142,10 +142,11 @@ class FormFile
$out .= "\n<!-- End form attach new file -->\n\n"; $out .= "\n<!-- End form attach new file -->\n\n";
$parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url); $parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url);
$res = $hookmanager->executeHooks('formattachOptions',$parameters,$object); $res = $hookmanager->executeHooks('formattachOptions',$parameters,$object);
if(!$res) { if (empty($res))
echo $out; {
} print $out;
echo $hookmanager->resPrint; }
print $hookmanager->resprint;
return 1; return 1;
} }
@ -502,7 +503,7 @@ class FormFile
// Autre cas // Autre cas
if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; } if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; }
if ($modulepart == 'export') { $relativepath = $file["name"]; } if ($modulepart == 'export') { $relativepath = $file["name"]; }
$out.= "<tr ".$bc[$var].">"; $out.= "<tr ".$bc[$var].">";
// Show file name with link to download // Show file name with link to download
@ -540,7 +541,7 @@ class FormFile
$out.= ($param?'&'.$param:''); $out.= ($param?'&'.$param:'');
$out.= '">'.img_printer().'</a></td>'; $out.= '">'.img_printer().'</a></td>';
} }
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); $parameters=array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''),'modulepart'=>$modulepart,'relativepath'=>$relativepath);
$res = $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file); $res = $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);