From c038049adfd0a911e3618cb088d352a961419d0d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Aug 2005 00:05:24 +0000 Subject: [PATCH] =?UTF-8?q?Am=E9lioration=20onglet=20document=20sur=20soci?= =?UTF-8?q?etes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/docsoc.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/htdocs/docsoc.php b/htdocs/docsoc.php index 06e6cd7c274..4e0949dea7e 100644 --- a/htdocs/docsoc.php +++ b/htdocs/docsoc.php @@ -41,16 +41,8 @@ $socid=$_GET["socid"]; /* * Creation répertoire si n'existe pas */ -if (! is_dir($conf->societe->dir_output)) { mkdir($conf->societe->dir_output); } $upload_dir = $conf->societe->dir_output . "/" . $socid ; -if (! is_dir($upload_dir)) -{ - umask(0); - if (! mkdir($upload_dir, 0755)) - { - print $langs->trans("ErrorCanNotCreateDir",$upload_dir); - } -} +if (! is_dir($upload_dir)) create_exdir($upload_dir); /* @@ -150,7 +142,11 @@ if ($socid > 0) $totalsize=0; $filearray=array(); - $handle=opendir($upload_dir); + + $errorlevel=error_reporting(); + error_reporting(0); + $handle=opendir($upload_dir); + error_reporting($errorlevel); if ($handle) { $i=0; @@ -167,7 +163,7 @@ if ($socid > 0) } else { - print $langs->trans("ErrorCanNotReadDir",$upload_dir); +// print '
'.$langs->trans("ErrorCanNotReadDir",$upload_dir).'
'; } print '';