Mark a duplicate function as deprecated

This commit is contained in:
Laurent Destailleur 2016-04-06 14:53:14 +02:00
parent 4e3985fbc5
commit 1a1dc39a6b
2 changed files with 6 additions and 5 deletions

View File

@ -1074,7 +1074,7 @@ if ($resql)
$paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param); $paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param);
$title=$langs->trans("MassFilesArea").' <a href="'.$_SERVER["PHP_SELF"].'?'.$paramwithoutshowfiles.'">('.$langs->trans("Hide").')</a>'; $title=$langs->trans("MassFilesArea").' <a href="'.$_SERVER["PHP_SELF"].'?'.$paramwithoutshowfiles.'">('.$langs->trans("Hide").')</a>';
$formfile->show_documents('massfilesarea','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,''); print $formfile->showdocuments('massfilesarea','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
} }
else else
{ {

View File

@ -237,6 +237,7 @@ class FormFile
* @param string $buttonlabel Label on submit button * @param string $buttonlabel Label on submit button
* @param string $codelang Default language code to use on lang combo box if multilang is enabled * @param string $codelang Default language code to use on lang combo box if multilang is enabled
* @return int <0 if KO, number of shown files if OK * @return int <0 if KO, number of shown files if OK
* @deprecated Use print xxx->showdocuments() instead.
*/ */
function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$maxfilenamelength=28,$noform=0,$param='',$title='',$buttonlabel='',$codelang='') function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$maxfilenamelength=28,$noform=0,$param='',$title='',$buttonlabel='',$codelang='')
{ {
@ -579,8 +580,8 @@ class FormFile
{ {
$file_list=dol_dir_list($filedir,'files',0,'','(\.meta|_preview\.png)$','date',SORT_DESC); $file_list=dol_dir_list($filedir,'files',0,'','(\.meta|_preview\.png)$','date',SORT_DESC);
// Affiche en-tete tableau si non deja affiche // Show title of array if not already shown
if (! empty($file_list) && ! $headershown) if ((! empty($file_list) || $modulepart == 'massfilesarea') && ! $headershown)
{ {
$headershown=1; $headershown=1;
$out.= '<div class="titre">'.$titletoshow.'</div>'; $out.= '<div class="titre">'.$titletoshow.'</div>';