Mark a duplicate function as deprecated
This commit is contained in:
parent
4e3985fbc5
commit
1a1dc39a6b
@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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='')
|
||||||
{
|
{
|
||||||
@ -274,7 +275,7 @@ class FormFile
|
|||||||
if (0 !== $iconPDF) {
|
if (0 !== $iconPDF) {
|
||||||
dol_syslog(__METHOD__ . ": passing iconPDF parameter is deprecated", LOG_WARNING);
|
dol_syslog(__METHOD__ . ": passing iconPDF parameter is deprecated", LOG_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
global $langs, $conf, $user, $hookmanager;
|
global $langs, $conf, $user, $hookmanager;
|
||||||
global $form, $bc;
|
global $form, $bc;
|
||||||
|
|
||||||
@ -286,7 +287,7 @@ class FormFile
|
|||||||
if (! empty($iconPDF)) {
|
if (! empty($iconPDF)) {
|
||||||
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
||||||
}
|
}
|
||||||
|
|
||||||
$printer=0;
|
$printer=0;
|
||||||
if (in_array($modulepart,array('facture','supplier_proposal','propal','proposal','order','commande','expedition', 'commande_fournisseur'))) // The direct print feature is implemented only for such elements
|
if (in_array($modulepart,array('facture','supplier_proposal','propal','proposal','order','commande','expedition', 'commande_fournisseur'))) // The direct print feature is implemented only for such elements
|
||||||
{
|
{
|
||||||
@ -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>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user