forked from Wavyzz/dolibarr
Fix: Use title
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
* \file htdocs/core/class/html.formfile.class.php
|
* \file htdocs/core/class/html.formfile.class.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File of class to offer components to list and upload files
|
* \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;
|
global $langs,$bc,$conf;
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
|
// Clean paramaters
|
||||||
if ($iconPDF == 1)
|
if ($iconPDF == 1)
|
||||||
{
|
{
|
||||||
$genallowed = '';
|
$genallowed = '';
|
||||||
@@ -196,12 +196,14 @@ class FormFile
|
|||||||
$modelselected = '';
|
$modelselected = '';
|
||||||
$forcenomultilang=0;
|
$forcenomultilang=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$filename = dol_sanitizeFileName($filename); //Must be sanitized before calling show_documents
|
//$filename = dol_sanitizeFileName($filename); //Must be sanitized before calling show_documents
|
||||||
$headershown=0;
|
$headershown=0;
|
||||||
$showempty=0;
|
$showempty=0;
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
|
$titletoshow=$langs->trans("Documents");
|
||||||
|
if (! empty($title)) $titletoshow=$title;
|
||||||
|
|
||||||
$out.= "\n".'<!-- Start show_document -->'."\n";
|
$out.= "\n".'<!-- Start show_document -->'."\n";
|
||||||
//print 'filedir='.$filedir;
|
//print 'filedir='.$filedir;
|
||||||
|
|
||||||
@@ -388,7 +390,7 @@ class FormFile
|
|||||||
$out.= '<input type="hidden" name="action" value="builddoc">';
|
$out.= '<input type="hidden" name="action" value="builddoc">';
|
||||||
$out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
$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.= '<table class="border formdoc" summary="listofdocumentstable" width="100%">';
|
||||||
|
|
||||||
$out.= '<tr '.$bc[$var].'>';
|
$out.= '<tr '.$bc[$var].'>';
|
||||||
@@ -465,6 +467,8 @@ class FormFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get list of files
|
// Get list of files
|
||||||
|
if ($filedir)
|
||||||
|
{
|
||||||
$png = '';
|
$png = '';
|
||||||
$filter = '';
|
$filter = '';
|
||||||
if ($iconPDF==1)
|
if ($iconPDF==1)
|
||||||
@@ -478,8 +482,6 @@ class FormFile
|
|||||||
if (sizeof($file_list) && ! $headershown && !$iconPDF)
|
if (sizeof($file_list) && ! $headershown && !$iconPDF)
|
||||||
{
|
{
|
||||||
$headershown=1;
|
$headershown=1;
|
||||||
$titletoshow=$langs->trans("Documents");
|
|
||||||
if (! empty($title)) $titletoshow=$title;
|
|
||||||
$out.= '<div class="titre">'.$titletoshow.'</div>';
|
$out.= '<div class="titre">'.$titletoshow.'</div>';
|
||||||
$out.= '<table class="border" summary="listofdocumentstable" width="100%">';
|
$out.= '<table class="border" summary="listofdocumentstable" width="100%">';
|
||||||
}
|
}
|
||||||
@@ -531,7 +533,7 @@ class FormFile
|
|||||||
|
|
||||||
$this->numoffiles++;
|
$this->numoffiles++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($headershown)
|
if ($headershown)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user