Skip to content
Snippets Groups Projects
Commit 1e4a024d authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Use title

parent 85174510
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@
* \file htdocs/core/class/html.formfile.class.php
* \ingroup core
* \brief File of class to offer components to list and upload files
* \version $Id: html.formfile.class.php,v 1.44 2011/07/06 13:15:24 eldy Exp $
* \version $Id: html.formfile.class.php,v 1.45 2011/07/06 17:44:56 eldy Exp $
*/
......@@ -186,9 +186,9 @@ class FormFile
global $langs,$bc,$conf;
$out='';
$var=true;
// Clean paramaters
if ($iconPDF == 1)
{
$genallowed = '';
......@@ -196,12 +196,14 @@ class FormFile
$modelselected = '';
$forcenomultilang=0;
}
//$filename = dol_sanitizeFileName($filename); //Must be sanitized before calling show_documents
$headershown=0;
$showempty=0;
$i=0;
$titletoshow=$langs->trans("Documents");
if (! empty($title)) $titletoshow=$title;
$out.= "\n".'<!-- Start show_document -->'."\n";
//print 'filedir='.$filedir;
......@@ -388,7 +390,7 @@ class FormFile
$out.= '<input type="hidden" name="action" value="builddoc">';
$out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$out.= '<div class="titre">'.$langs->trans("Documents").'</div>';
$out.= '<div class="titre">'.$titletoshow.'</div>';
$out.= '<table class="border formdoc" summary="listofdocumentstable" width="100%">';
$out.= '<tr '.$bc[$var].'>';
......@@ -465,6 +467,8 @@ class FormFile
}
// Get list of files
if ($filedir)
{
$png = '';
$filter = '';
if ($iconPDF==1)
......@@ -478,8 +482,6 @@ class FormFile
if (sizeof($file_list) && ! $headershown && !$iconPDF)
{
$headershown=1;
$titletoshow=$langs->trans("Documents");
if (! empty($title)) $titletoshow=$title;
$out.= '<div class="titre">'.$titletoshow.'</div>';
$out.= '<table class="border" summary="listofdocumentstable" width="100%">';
}
......@@ -531,7 +533,7 @@ class FormFile
$this->numoffiles++;
}
}
if ($headershown)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment