diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php
index 44eb15e8ace..c689d0f3501 100644
--- a/htdocs/comm/action/rapport/index.php
+++ b/htdocs/comm/action/rapport/index.php
@@ -27,6 +27,7 @@
*/
require_once("./pre.inc.php");
+require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
require_once(DOL_DOCUMENT_ROOT."/includes/modules/action/rapport.pdf.php");
@@ -121,8 +122,8 @@ if ($resql)
if (file_exists($file))
{
print '
'.img_pdf().' | ';
- print ''.dol_print_date(filemtime($file),'dayhour').' | ';
- print ''.filesize($file). ' '.$langs->trans("Bytes").' | ';
+ print ''.dol_print_date(dol_filemtime($file),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($file)).' | ';
}
else {
print ' | ';
diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php
index 9583c6852ab..afb33a55610 100644
--- a/htdocs/comm/propal/apercu.php
+++ b/htdocs/comm/propal/apercu.php
@@ -158,17 +158,17 @@ if ($_GET["propalid"] > 0)
print "| ".$langs->trans("Propal")." PDF | ";
print ''.$propal->ref.'.pdf | ';
- print ''.filesize($file). ' bytes | ';
- print ''.dol_print_date(filemtime($file),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($file)).' | ';
+ print ''.dol_print_date(dol_filemtime($file),'dayhour').' | ';
print '
';
// Si fichier detail PDF existe
if (file_exists($filedetail)) { // propal d�taill�e suppl�mentaire
- print "| Propal d�taill�e | ";
+ print "
| Propal detaillee | ";
print ''.$propal->ref.'-detail.pdf | ';
- print ''.filesize($filedetail). ' bytes | ';
- print ''.dol_print_date(filemtime($filedetail),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($filedetail)).' | ';
+ print ''.dol_print_date(dol_filemtime($filedetail),'dayhour').' | ';
print '
';
}
print "\n";
diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php
index 1f683eac1d3..c910c6f9e1e 100644
--- a/htdocs/commande/apercu.php
+++ b/htdocs/commande/apercu.php
@@ -153,17 +153,17 @@ if ($_GET["id"] > 0) {
print "| ".$langs->trans("Order")." PDF | ";
print ''.$commande->ref.'.pdf | ';
- print ''.filesize($file). ' bytes | ';
- print ''.dol_print_date(filemtime($file),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($file)).' | ';
+ print ''.dol_print_date(dol_filemtime($file),'dayhour').' | ';
print '
';
// Si fichier detail PDF existe
if (file_exists($filedetail)) { // commande d�taill�e suppl�mentaire
- print "| Commande d�taill�e | ";
+ print "
| Commande detaillee | ";
print ''.$commande->ref.'-detail.pdf | ';
- print ''.filesize($filedetail). ' bytes | ';
- print ''.dol_print_date(filemtime($filedetail),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($filedetail)).' | ';
+ print ''.dol_print_date(dol_filemtime($filedetail),'dayhour').' | ';
print '
';
}
print "\n";
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index 3352f2bd390..a892f162fc2 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -163,18 +163,18 @@ if ($_GET["facid"] > 0)
print "| ".$langs->trans("Bill")." PDF | ";
print ''.$fac->ref.'.pdf | ';
- print ''.filesize($file). ' bytes | ';
- print ''.dol_print_date(filemtime($file),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($file)). ' | ';
+ print ''.dol_print_date(dol_filemtime($file),'dayhour').' | ';
print '
';
// Si fichier detail PDF existe
- if (file_exists($filedetail)) // facture d�taill�e suppl�mentaire
+ if (file_exists($filedetail)) // facture detaillee supplementaire
{
print "| Facture d�taill�e | ";
print ''.$fac->ref.'-detail.pdf | ';
- print ''.filesize($filedetail). ' bytes | ';
- print ''.dol_print_date(filemtime($filedetail),"%d %b %Y %H:%M:%S").' | ';
+ print ''.dol_print_size(dol_filesize($filedetail)).' | ';
+ print ''.dol_print_date(dol_filemtime($filedetail),'dayhour').' | ';
print '
';
}
diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php
index 849ed02273b..621da00f1f0 100644
--- a/htdocs/compta/paiement/rapport.php
+++ b/htdocs/compta/paiement/rapport.php
@@ -171,8 +171,8 @@ if ($year)
$tfile = $dir . '/'.$year.'/'.$file;
$relativepath = $year.'/'.$file;
print "".'| '.img_pdf().' '.$file.' | ';
- print ''.filesize($tfile). ' '.$langs->trans("Bytes").' | ';
- print ''.dol_print_date(filemtime($tfile),"dayhour").' |
';
+ print ''.dol_print_size(dol_filesize($tfile)).' | ';
+ print ''.dol_print_date(dol_filemtime($tfile),"dayhour").' | ';
}
}
print '';
diff --git a/htdocs/ecm/docother.php b/htdocs/ecm/docother.php
index b1b3af01782..f78e37b6844 100644
--- a/htdocs/ecm/docother.php
+++ b/htdocs/ecm/docother.php
@@ -125,8 +125,8 @@ if ($handle)
if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
{
$filearray[$i]->name=$file;
- $filearray[$i]->size=filesize($upload_dir."/".$file);
- $filearray[$i]->date=filemtime($upload_dir."/".$file);
+ $filearray[$i]->size=dol_filesize($upload_dir."/".$file);
+ $filearray[$i]->date=dol_filemtime($upload_dir."/".$file);
$totalsize+=$filearray[$i]->size;
$i++;
}
diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php
index 80035237ef9..d8e318aef0a 100644
--- a/htdocs/fichinter/apercu.php
+++ b/htdocs/fichinter/apercu.php
@@ -24,7 +24,7 @@
/**
\file htdocs/fichinter/apercu.php
\ingroup fichinter
- \brief Page de l'onglet aperçu d'une fiche d'intervention
+ \brief Page de l'onglet aper�u d'une fiche d'intervention
\version $Revision$
*/
@@ -107,7 +107,7 @@ if ($_GET["id"] > 0) {
$relativepath = "${fichinterref}/${fichinterref}.pdf";
$relativepathdetail = "${fichinterref}/${fichinterref}-detail.pdf";
- // Chemin vers png aperçus
+ // Chemin vers png aper�us
$relativepathimage = "${fichinterref}/${fichinterref}.pdf.png";
$fileimage = $file.".png"; // Si PDF d'1 page
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
@@ -124,17 +124,17 @@ if ($_GET["id"] > 0) {
print "| ".$langs->trans("Intervention")." PDF | ";
print ''.$fichinter->ref.'.pdf | ';
- print ''.filesize($file). ' bytes | ';
- print ''.dol_print_date(filemtime($file),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($file)).' | ';
+ print ''.dol_print_date(dol_filemtime($file),'dayhour').' | ';
print '
';
// Si fichier detail PDF existe
- if (file_exists($filedetail)) { // fichinter détaillée supplémentaire
- print "| Fiche d'intervention détaillée | ";
+ if (file_exists($filedetail)) { // fichinter d�taill�e suppl�mentaire
+ print "
| Fiche d'intervention d�taill�e | ";
print ''.$fichinter->ref.'-detail.pdf | ';
- print ''.filesize($filedetail). ' bytes | ';
- print ''.dol_print_date(filemtime($filedetail),'dayhour').' | ';
+ print ''.dol_print_size(dol_filesize($filedetail)).' | ';
+ print ''.dol_print_date(dol_filemtime($filedetail),'dayhour').' | ';
print '
';
}
print "\n";
@@ -193,17 +193,17 @@ if ($_GET["id"] > 0) {
dol_print_error($db);
}
} else {
- // Intervention non trouvée
+ // Intervention non trouv�e
print $langs->trans("ErrorFichinterNotFound",$_GET["id"]);
}
}
-// Si fichier png PDF d'1 page trouvé
+// Si fichier png PDF d'1 page trouv�
if (file_exists($fileimage))
{
print '
';
}
-// Si fichier png PDF de plus d'1 page trouvé
+// Si fichier png PDF de plus d'1 page trouv�
elseif (file_exists($fileimagebis))
{
$multiple = $relativepathimage . ".";
diff --git a/htdocs/html.formfile.class.php b/htdocs/html.formfile.class.php
index a9085f32d3c..43bdb11974b 100644
--- a/htdocs/html.formfile.class.php
+++ b/htdocs/html.formfile.class.php
@@ -376,9 +376,9 @@ class FormFile
print '';
if (!$iconPDF) print '';
// Affiche taille fichier
- if (!$iconPDF) print ''.dol_print_size(filesize($filedir."/".$file["name"])).' | ';
+ if (!$iconPDF) print ''.dol_print_size(dol_filesize($filedir."/".$file["name"])).' | ';
// Affiche date fichier
- if (!$iconPDF) print ''.dol_print_date(filemtime($filedir."/".$file["name"]),'dayhour').' | ';
+ if (!$iconPDF) print ''.dol_print_date(dol_filemtime($filedir."/".$file["name"]),'dayhour').' | ';
if ($delallowed)
{
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 299d51f0192..fe4edd12cb5 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -561,9 +561,9 @@ if ($step == 3 && $datatoimport)
print ''.img_mime($file).' | ';
print ''.$file.' | ';
// Affiche taille fichier
- print ''.dol_print_size(filesize($newdir.'/'.$newfile)).' | ';
+ print ''.dol_print_size(dol_filesize($newdir.'/'.$newfile)).' | ';
// Affiche date fichier
- print ''.dol_print_date(filemtime($newdir.'/'.$newfile),'dayhour').' | ';
+ print ''.dol_print_date(dol_filemtime($newdir.'/'.$newfile),'dayhour').' | ';
// Del button
print 'handle = fopen($newfile, "r");
if (! $this->handle)
{
$langs->load("errors");
diff --git a/htdocs/install/check.php b/htdocs/install/check.php
index cb5847cffc0..74fe8a1fe83 100644
--- a/htdocs/install/check.php
+++ b/htdocs/install/check.php
@@ -1,7 +1,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur
- * Copyright (C) 2005 Marc Barilley / Océbo
+ * Copyright (C) 2005 Marc Barilley / Oc�bo
* Copyright (C) 2005-2009 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
@@ -22,7 +22,7 @@
/**
* \file htdocs/install/check.php
* \ingroup install
- * \brief Test si le fichier conf est modifiable et si il n'existe pas, test la possibilité de le créer
+ * \brief Test si le fichier conf est modifiable et si il n'existe pas, test la possibilit� de le cr�er
* \version $Id$
*/
include_once("./inc.php");
@@ -151,7 +151,7 @@ if ($memmaxorig != '')
}
-// Si fichier présent et lisible et renseigné
+// Si fichier present et lisible et renseigne
clearstatcache();
if (is_readable($conffile) && filesize($conffile) > 8)
{
@@ -159,13 +159,13 @@ if (is_readable($conffile) && filesize($conffile) > 8)
$confexists=1;
include_once($conffile);
- // Deja installé, on peut upgrader
+ // Deja install�, on peut upgrader
// \todo Test if database ok
$allowupgrade=1;
}
else
{
- // Si non on le crée
+ // Si non on le cr�e
dolibarr_install_syslog("check: we try to creat conf file '$conffile'");
$confexists=0;
@@ -196,7 +196,7 @@ else
-// Si fichier absent et n'a pu etre créé
+// Si fichier absent et n'a pu etre cr��
if (! file_exists($conffile))
{
//print ' '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated",$conffile);
@@ -210,7 +210,7 @@ if (! file_exists($conffile))
}
else
{
- // Si fichier présent mais ne peut etre modifié
+ // Si fichier pr�sent mais ne peut etre modifi�
if (!is_writable($conffile))
{
if ($confexists)
@@ -227,7 +227,7 @@ else
$allowinstall=0;
}
- // Si fichier présent et peut etre modifié
+ // Si fichier pr�sent et peut etre modifi�
else
{
if ($confexists)
@@ -246,7 +246,7 @@ else
}
print " \n";
- // Si prerequis ok, on affiche le bouton pour passer à l'étape suivante
+ // Si prerequis ok, on affiche le bouton pour passer � l'�tape suivante
if ($checksok)
{
$ok=0;
diff --git a/htdocs/lib/CMailFile.class.php b/htdocs/lib/CMailFile.class.php
index ac71d17c1f8..dd3bb158983 100644
--- a/htdocs/lib/CMailFile.class.php
+++ b/htdocs/lib/CMailFile.class.php
@@ -230,10 +230,10 @@ class CMailFile
$mail->B3B = $this->alternative_boundary;
$mail->XMailer = "Dolibarr version " . DOL_VERSION ." (using simplemail)";
-
+
// Add Errors-To
$mail->ErrorsTo = $this->getValidAddress($errors_to,1);
-
+
//Add Return-Path
$mail->returnpath = $this->getValidAddress($errors_to,1);
diff --git a/htdocs/lib/files.lib.php b/htdocs/lib/files.lib.php
index 540a32eea79..37698faf74a 100644
--- a/htdocs/lib/files.lib.php
+++ b/htdocs/lib/files.lib.php
@@ -253,7 +253,7 @@ function dol_count_nb_of_line($file)
*/
function dol_filesize($pathoffile)
{
- $newpathoffile=check_utf8($pathoffile)?utf8_decode($pathoffile):$pathoffile;
+ $newpathoffile=utf8_check($pathoffile)?utf8_decode($pathoffile):$pathoffile;
return filesize($pathoffile);
}
@@ -263,10 +263,10 @@ function dol_filesize($pathoffile)
* @param $pathoffile
* @return timestamp Time of file
*/
-function dol_filetime($pathoffile)
+function dol_filemtime($pathoffile)
{
- $newpathoffile=check_utf8($pathoffile)?utf8_decode($pathoffile):$pathoffile;
- return filemtime($nrwpathoffile);
+ $newpathoffile=utf8_check($pathoffile)?utf8_decode($pathoffile):$pathoffile;
+ return filemtime($newpathoffile);
}
/**
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index ebbeb789d44..7633b9763c3 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -240,8 +240,8 @@ if ($socid > 0)
echo ''.$file.'';
print " | \n";
- print ''.filesize($courrier_dir."/".$file). ' '.$langs->trans("bytes").' | ';
- print ''.dol_print_date(filemtime($courrier_dir."/".$file),"dayhour").' | ';
+ print ''.dol_print_size(dol_filesize($courrier_dir."/".$file)).' | ';
+ print ''.dol_print_date(dol_filemtime($courrier_dir."/".$file),'dayhour').' | ';
print "\n";
}
}