Fix: prepare external extended ged

This commit is contained in:
Regis Houssin 2012-09-03 21:00:46 +02:00
parent bfc933df4d
commit 15db85bc86
3 changed files with 7 additions and 7 deletions

View File

@ -495,17 +495,18 @@ class FormFile
$out.= '</a>'."\n";
if (! $iconPDF)
{
$size=(! empty($file['size'])?$file['size']:dol_filesize($filedir."/".$file["name"]));
$date=(! empty($file['date'])?$file['date']:dol_filemtime($filedir."/".$file["name"]));
$out.= '</td>';
// Show file size
$out.= '<td align="right" nowrap="nowrap">'.dol_print_size(dol_filesize($filedir."/".$file["name"])).'</td>';
$out.= '<td align="right" nowrap="nowrap">'.dol_print_size($size).'</td>';
// Show file date
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date(dol_filemtime($filedir."/".$file["name"]),'dayhour').'</td>';
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date($date, 'dayhour').'</td>';
}
if ($delallowed)
{
$out.= '<td align="right">';
//$out.= '<a href="'.DOL_URL_ROOT.'/document.php?action=remove_file&amp;modulepart='.$modulepart.'&amp;file='.urlencode($relativepath);
$out.= '<a href="'.$urlsource.(strpos($urlsource,'?')?'&':'?').'action=remove_file&modulepart='.$modulepart.'&file='.urlencode($relativepath);
$out.= ($param?'&'.$param:'');
$out.= '&urlsource='.urlencode($urlsource);
@ -577,7 +578,6 @@ class FormFile
{
if ($file['name'] != '.'
&& $file['name'] != '..'
&& $file['name'] != 'CVS'
&& ! preg_match('/\.meta$/i',$file['name']))
{
// Define relative path used to store the file

View File

@ -489,4 +489,4 @@ function accessforbidden($message='',$printheader=1,$printfooter=1,$showonlymess
exit(0);
}
?>
?>

View File

@ -1273,7 +1273,7 @@ abstract class DolibarrModules
$err=0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE ".$this->db->decrypt('name')." like '".$this->const_name."_DIR_%'";
$sql.= " WHERE ".$this->db->decrypt('name')." LIKE '".$this->const_name."_DIR_%'";
$sql.= " AND entity = ".$conf->entity;
dol_syslog(get_class($this)."::delete_dirs sql=".$sql);
@ -1408,4 +1408,4 @@ abstract class DolibarrModules
}
}
?>
?>