From 5eac3a9105bab51d791381e6ddd9b5a764095b26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Apr 2005 17:40:57 +0000 Subject: [PATCH] Trad: Traduction page documents --- htdocs/docsoc.php | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/htdocs/docsoc.php b/htdocs/docsoc.php index 548db1869db..2bc32c08d14 100644 --- a/htdocs/docsoc.php +++ b/htdocs/docsoc.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,8 @@ * $Source$ */ -/** \file htdocs/docsoc.php +/** + \file htdocs/docsoc.php \brief Fichier onglet documents liés à la société \ingroup societe \version $Revision$ @@ -47,7 +48,7 @@ if (! is_dir($upload_dir)) umask(0); if (! mkdir($upload_dir, 0755)) { - print "Impossible de créer $upload_dir"; + print $langs->trans("ErrorCanNotCreateDir",$upload_dir); } } @@ -57,19 +58,19 @@ if (! is_dir($upload_dir)) */ if ( $_POST["sendit"] && defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1) { - if (is_dir($upload_dir)) + if (is_dir($upload_dir)) { - if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'])) - { - $mesg = '
Le fichier est valide, et a été téléchargé avec succès.
'; - //print_r($_FILES); - } - else - { - $mesg = '
Le fichier n\'a pas été téléchargé
'; - // print_r($_FILES); - } - + if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'])) + { + $mesg = '
'.$langs->trans("FileTransferComplete").'
'; + //print_r($_FILES); + } + else + { + // Echec transfert (fichier dépassant la limite ?) + $mesg = '
'.$langs->trans("ErrorFileNotUploaded").'
'; + // print_r($_FILES); + } } } @@ -85,11 +86,10 @@ if ($_GET["action"]=='delete') $mesg = '
Le fichier a été supprimé
'; } + /* - * * Mode fiche * - * */ if ($socid > 0) @@ -152,7 +152,6 @@ if ($socid > 0) * */ - print_titre("Documents associés"); if (defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1) { @@ -174,7 +173,7 @@ if ($socid > 0) } else { - print "La gestion des fichiers associés est désactivée sur ce serveur"; + print $langs->trans("ErrorAttachedFilesDisabled").".
"; } print '
'; @@ -183,11 +182,11 @@ if ($socid > 0) // Affiche liste des documents existant + print_titre($langs->trans("AttachedFiles")); clearstatcache(); $handle=opendir($upload_dir); - if ($handle) { print ''; @@ -218,7 +217,7 @@ if ($socid > 0) } else { - print "Impossible d'ouvrir : ".$upload_dir.""; + print $langs->trans("ErrorCanNotReadDir",$upload_dir); } } else