From c4b845d60af23a5a6d18450bb96eb4e50b89ef62 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 19 Feb 2012 18:34:22 +0100 Subject: [PATCH] Qual: Removed deprecated function name. --- htdocs/adherents/document.php | 2 +- htdocs/adherents/stats/geo.php | 2 +- htdocs/adherents/stats/index.php | 2 +- htdocs/admin/company.php | 2 +- htdocs/admin/mails.php | 2 +- htdocs/admin/security_other.php | 2 +- htdocs/admin/tools/update.php | 2 +- htdocs/categories/class/categorie.class.php | 2 +- htdocs/comm/action/document.php | 2 +- htdocs/comm/propal/document.php | 2 +- htdocs/comm/propal/stats/index.php | 2 +- htdocs/commande/document.php | 2 +- htdocs/commande/stats/index.php | 2 +- htdocs/compta/bank/graph.php | 2 +- htdocs/compta/deplacement/stats/index.php | 2 +- htdocs/compta/facture/document.php | 2 +- htdocs/compta/facture/impayees.php | 2 +- htdocs/compta/facture/stats/index.php | 2 +- .../class/bon-prelevement.class.php | 2 +- htdocs/compta/sociales/document.php | 2 +- htdocs/contrat/document.php | 2 +- htdocs/core/ajax/fileupload.php | 4 ++-- htdocs/core/class/html.formother.class.php | 2 +- htdocs/core/class/ldap.class.php | 2 +- htdocs/core/lib/files.lib.php | 2 +- htdocs/core/lib/functions.lib.php | 18 ++++++------------ htdocs/core/lib/images.lib.php | 2 +- htdocs/core/modules/DolibarrModules.class.php | 2 +- htdocs/core/modules/action/rapport.pdf.php | 2 +- .../modules/barcode/phpbarcode.modules.php | 2 +- .../modules/cheque/pdf/pdf_blochet.class.php | 2 +- .../doc/doc_generic_order_odt.modules.php | 4 ++-- .../commande/doc/pdf_edison.modules.php | 2 +- .../commande/doc/pdf_einstein.modules.php | 2 +- .../core/modules/dons/html_cerfafr.modules.php | 2 +- .../doc/pdf_expedition_merou.modules.php | 2 +- .../doc/pdf_expedition_rouget.modules.php | 2 +- .../doc/doc_generic_invoice_odt.modules.php | 4 ++-- .../modules/facture/doc/pdf_crabe.modules.php | 2 +- .../modules/facture/doc/pdf_oursin.modules.php | 2 +- .../fichinter/doc/pdf_soleil.modules.php | 2 +- .../livraison/pdf/pdf_sirocco.modules.php | 2 +- .../livraison/pdf/pdf_typhon.modules.php | 2 +- htdocs/core/modules/mailings/peche.modules.php | 2 +- .../member/cards/pdf_standard.class.php | 2 +- .../member/labels/pdf_standardlabel.class.php | 2 +- htdocs/core/modules/modCommande.class.php | 2 +- htdocs/core/modules/modFacture.class.php | 2 +- htdocs/core/modules/modPropale.class.php | 2 +- htdocs/core/modules/modSociete.class.php | 2 +- .../project/pdf/pdf_baleine.modules.php | 2 +- .../doc/doc_generic_proposal_odt.modules.php | 4 ++-- .../modules/propale/doc/pdf_azur.modules.php | 2 +- .../modules/propale/doc/pdf_jaune.modules.php | 2 +- .../modules/rapport/pdf_paiement.class.php | 2 +- .../societe/doc/doc_generic_odt.modules.php | 4 ++-- .../pdf/pdf_canelle.modules.php | 2 +- .../pdf/pdf_muscadet.modules.php | 2 +- htdocs/ecm/class/ecmdirectory.class.php | 2 +- htdocs/ecm/docmine.php | 2 +- htdocs/ecm/docother.php | 2 +- htdocs/ecm/index.php | 2 +- htdocs/expedition/stats/month.php | 2 +- htdocs/fichinter/document.php | 2 +- htdocs/fourn/commande/document.php | 2 +- htdocs/fourn/facture/document.php | 2 +- htdocs/ftp/index.php | 2 +- htdocs/install/etape1.php | 2 +- htdocs/product/class/product.class.php | 4 ++-- htdocs/product/document.php | 2 +- htdocs/projet/document.php | 2 +- htdocs/projet/tasks/document.php | 2 +- htdocs/societe/document.php | 2 +- htdocs/societe/soc.php | 4 ++-- htdocs/user/fiche.php | 2 +- scripts/invoices/rebuild_merge_pdf.php | 2 +- 76 files changed, 88 insertions(+), 94 deletions(-) diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 2e83fa53e25..c7e596fe1a1 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -69,7 +69,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 1ef10f09dae..c0453f5a951 100755 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -60,7 +60,7 @@ if ($mode == 'memberbytown') $title=$langs->trans("MembersStatisticsByTown"); print_fiche_titre($title, $mesg); -create_exdir($dir); +dol_mkdir($dir); if ($mode) { diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index f44f69277df..c3486f5aeb1 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -59,7 +59,7 @@ print_fiche_titre($langs->trans("SubscriptionsStatistics"), $mesg); $dir=$conf->adherent->dir_temp; -create_exdir($dir); +dol_mkdir($dir); $stats = new AdherentStats($db, $socid, $userid); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index c45ce72c04d..2ace9e20590 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -78,7 +78,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["c dol_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->mycompany->dir_output.'/logos/'.$original_file); if (! is_dir($conf->mycompany->dir_output.'/logos/')) { - create_exdir($conf->mycompany->dir_output.'/logos/'); + dol_mkdir($conf->mycompany->dir_output.'/logos/'); } $result=dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->mycompany->dir_output.'/logos/'.$original_file,1,0,$_FILES['logo']['error']); if ($result > 0) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index dc5ea60f6b3..a36e6cc0215 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -81,7 +81,7 @@ if ($_POST['addfile'] || $_POST['addfilehtml']) $vardir=$conf->user->dir_output."/".$user->id; $upload_dir = $vardir.'/temp'; - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'], 1, 0, $_FILES['addedfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 07abdecf796..f14b719d41a 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -43,7 +43,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - $result=create_exdir($upload_dir); // Create dir if not exists + $result=dol_mkdir($upload_dir); // Create dir if not exists if ($result >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],1,0,$_FILES['userfile']['error']); diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index 84c8d1c2581..7e56a51f426 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -69,7 +69,7 @@ if ($_POST["action"]=='install') if (! $error) { @dol_delete_dir_recursive($conf->admin->dir_temp.'/'.$original_file); - create_exdir($conf->admin->dir_temp.'/'.$original_file); + dol_mkdir($conf->admin->dir_temp.'/'.$original_file); $result=dol_move_uploaded_file($_FILES["fileinstall"]["tmp_name"],$newfile,1,0,$_FILES['fileinstall']['error']); if ($result > 0) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 9ffa2593983..7a7cc186a6d 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1214,7 +1214,7 @@ class Categorie if (! file_exists($dir)) { - create_exdir($dir); + dol_mkdir($dir); } if (file_exists($dir)) diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index f007695d6b8..da79ff42233 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -72,7 +72,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) // Creation repertoire si n'existe pas $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 29ffea851c9..56f8fd581fa 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -72,7 +72,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $upload_dir = $conf->propale->dir_output . "/" . dol_sanitizeFileName($object->ref); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index b7e2c0b3ca9..7dcff4a5b54 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -60,7 +60,7 @@ print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg); $dir=$conf->propale->dir_temp; -create_exdir($dir); +dol_mkdir($dir); $stats = new PropaleStats($db, $socid, $userid); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 2833215960d..e2b9f431043 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -75,7 +75,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index d457cc874ba..57ce188be25 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -73,7 +73,7 @@ if ($mode == 'supplier') print_fiche_titre($title, $mesg); -create_exdir($dir); +dol_mkdir($dir); $stats = new CommandeStats($db, $socid, $mode, $userid); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 3a4fa82db03..29ed40be23a 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -73,7 +73,7 @@ if ($_GET["ref"]) $account=$acct->id; } -$result=create_exdir($conf->banque->dir_temp); +$result=dol_mkdir($conf->banque->dir_temp); if ($result < 0) { $langs->load("errors"); diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 9d8c6e16c11..d9847f8cb52 100755 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -62,7 +62,7 @@ $dir=$conf->deplacement->dir_temp; print_fiche_titre($title, $mesg); -create_exdir($dir); +dol_mkdir($dir); $stats = new DeplacementStats($db, $socid, $userid); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index f6ceb457ea5..720d37f7772 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -77,7 +77,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 305e6131b0b..24bf6de375e 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -105,7 +105,7 @@ if ($action == "builddoc" && $user->rights->facture->lire) } // Create output dir if not exists - create_exdir($diroutputpdf); + dol_mkdir($diroutputpdf); // Save merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 023dddc0999..54dc1244aeb 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -72,7 +72,7 @@ if ($mode == 'supplier') print_fiche_titre($title, $mesg); -create_exdir($dir); +dol_mkdir($dir); $stats = new FactureStats($db, $socid, $mode, ($userid>0?$userid:0)); diff --git a/htdocs/compta/prelevement/class/bon-prelevement.class.php b/htdocs/compta/prelevement/class/bon-prelevement.class.php index 75fb2e0ac44..cfc85a6c17a 100644 --- a/htdocs/compta/prelevement/class/bon-prelevement.class.php +++ b/htdocs/compta/prelevement/class/bon-prelevement.class.php @@ -913,7 +913,7 @@ class BonPrelevement extends CommonObject $dir=$conf->prelevement->dir_output.'/receipts'; $file=$filebonprev; - if (! is_dir($dir)) create_exdir($dir); + if (! is_dir($dir)) dol_mkdir($dir); $bonprev = new BonPrelevement($this->db, $dir."/".$file); $bonprev->id = $prev_id; diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 4e2a6b0be0a..953d394896c 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -75,7 +75,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 528106c56e7..2aab133d065 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -71,7 +71,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/core/ajax/fileupload.php b/htdocs/core/ajax/fileupload.php index 5d4390bc04c..76ac6499cfa 100644 --- a/htdocs/core/ajax/fileupload.php +++ b/htdocs/core/ajax/fileupload.php @@ -159,7 +159,7 @@ class UploadHandler $file_path = $this->_options['upload_dir'].$file_name; $new_file_path = $options['upload_dir'].$file_name; - if (create_exdir($options['upload_dir']) >= 0) + if (dol_mkdir($options['upload_dir']) >= 0) { list($img_width, $img_height) = @getimagesize($file_path); if (!$img_width || !$img_height) { @@ -235,7 +235,7 @@ class UploadHandler $file->size = intval($size); $file->type = $type; $error = $this->has_error($uploaded_file, $file, $error); - if (!$error && $file->name && create_exdir($this->_options['upload_dir']) >= 0) { + if (!$error && $file->name && dol_mkdir($this->_options['upload_dir']) >= 0) { if ($file->name[0] === '.') { $file->name = substr($file->name, 1); } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 09e00ed12cf..17d37f6afe6 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -470,7 +470,7 @@ class FormOther // On cree le repertoire contenant les icones if (! file_exists($conf->$module->dir_temp)) { - create_exdir($conf->$module->dir_temp); + dol_mkdir($conf->$module->dir_temp); } // On cree l'image en vraies couleurs diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index ce2a91d0c47..0c9492793f5 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -647,7 +647,7 @@ class Ldap $content=$this->dump_content($dn, $info); //Create file - $result=create_exdir($conf->ldap->dir_temp); + $result=dol_mkdir($conf->ldap->dir_temp); $outputfile=$conf->ldap->dir_temp.'/ldapinput.in'; $fp=fopen($outputfile,"w"); diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 4bb630d685b..88e71bf78e9 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -808,7 +808,7 @@ function dol_meta_create($object) if (! is_dir($dir)) { - create_exdir($dir); + dol_mkdir($dir); } if (is_dir($dir)) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a3f1105946c..9988312908c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1409,7 +1409,7 @@ function isValidEmail($address) * @param string $address phone (Ex: "0601010101") * @return boolean true if phone syntax is OK, false if KO or empty string */ -function isValidPhone($address) +function isValidPhone($phone) { return true; } @@ -2279,7 +2279,7 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar * Get title line of an array * * @param string $name Label of field - * @param int $thead For thead format + * @param int $thead For thead format * @param string $file Url used when we click on sort picto * @param string $field Field to use for new sorting * @param string $begin ("" by defaut) @@ -3039,12 +3039,6 @@ function get_exdir($num,$level=3,$alpha=0,$withoutslash=0) return $path; } -// For backward compatibility -function create_exdir($dir) -{ - dol_mkdir($dir); -} - /** * Creation of a directory (this can create recursive subdir) * @@ -3055,7 +3049,7 @@ function dol_mkdir($dir) { global $conf; - dol_syslog("functions.lib::create_exdir: dir=".$dir,LOG_INFO); + dol_syslog("functions.lib::dol_mkdir: dir=".$dir,LOG_INFO); $dir_osencoded=dol_osencode($dir); if (@is_dir($dir_osencoded)) return 0; @@ -3079,7 +3073,7 @@ function dol_mkdir($dir) $ccdir_osencoded=dol_osencode($ccdir); if (! @is_dir($ccdir_osencoded)) { - dol_syslog("functions.lib::create_exdir: Directory '".$ccdir."' does not exists or is outside open_basedir PHP setting.",LOG_DEBUG); + dol_syslog("functions.lib::dol_mkdir: Directory '".$ccdir."' does not exists or is outside open_basedir PHP setting.",LOG_DEBUG); umask(0); $dirmaskdec=octdec('0755'); @@ -3088,12 +3082,12 @@ function dol_mkdir($dir) if (! @mkdir($ccdir_osencoded, $dirmaskdec)) { // Si le is_dir a renvoye une fausse info, alors on passe ici. - dol_syslog("functions.lib::create_exdir: Fails to create directory '".$ccdir."' or directory already exists.",LOG_WARNING); + dol_syslog("functions.lib::dol_mkdir: Fails to create directory '".$ccdir."' or directory already exists.",LOG_WARNING); $nberr++; } else { - dol_syslog("functions.lib::create_exdir: Directory '".$ccdir."' created",LOG_DEBUG); + dol_syslog("functions.lib::dol_mkdir: Directory '".$ccdir."' created",LOG_DEBUG); $nberr=0; // On remet a zero car si on arrive ici, cela veut dire que les echecs precedents peuvent etre ignore $nbcreated++; } diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index 441ce80ee25..dd790a9ca3e 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -386,7 +386,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $ // On cree le repertoire contenant les vignettes $dirthumb = $dir.($outdir?'/'.$outdir:''); // Chemin du dossier contenant les vignettes - create_exdir($dirthumb); + dol_mkdir($dirthumb); // Initialisation des variables selon l'extension de l'image switch($infoImg[2]) diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 467ee6d4add..7059c1c46a2 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1246,7 +1246,7 @@ abstract class DolibarrModules // Create dir if it does not exists if ($fulldir && ! file_exists($fulldir)) { - if (create_exdir($fulldir) < 0) + if (dol_mkdir($fulldir) < 0) { $this->error = $langs->trans("ErrorCanNotCreateDir",$fulldir); dol_syslog(get_class($this)."::_init ".$this->error, LOG_ERR); diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 8fb95fb1153..498615f129d 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -103,7 +103,7 @@ class CommActionRapport if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/barcode/phpbarcode.modules.php b/htdocs/core/modules/barcode/phpbarcode.modules.php index 3e34e40f4a0..4cc0eba12bb 100644 --- a/htdocs/core/modules/barcode/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/phpbarcode.modules.php @@ -147,7 +147,7 @@ class modPhpbarcode extends ModeleBarCode { global $conf,$filebarcode; - create_exdir($conf->barcode->dir_temp); + dol_mkdir($conf->barcode->dir_temp); $file=$conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php index f6c0163b2cb..d905cd2c2ac 100644 --- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php @@ -103,7 +103,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts if (! is_dir($dir)) { - $result=create_exdir($dir); + $result=dol_mkdir($dir); if ($result < 0) { diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 190e603f74b..61af8b88a16 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -271,7 +271,7 @@ class doc_generic_order_odt extends ModelePDFCommandes if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return -1; @@ -293,7 +293,7 @@ class doc_generic_order_odt extends ModelePDFCommandes //print "file=".$file; //print "conf->societe->dir_temp=".$conf->societe->dir_temp; - create_exdir($conf->commande->dir_temp); + dol_mkdir($conf->commande->dir_temp); // If BILLING contact defined on invoice, we use it diff --git a/htdocs/core/modules/commande/doc/pdf_edison.modules.php b/htdocs/core/modules/commande/doc/pdf_edison.modules.php index 347fdb934cf..6c802f673f3 100644 --- a/htdocs/core/modules/commande/doc/pdf_edison.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_edison.modules.php @@ -129,7 +129,7 @@ class pdf_edison extends ModelePDFCommandes if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 118b9bd4712..e3b43203cf6 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -166,7 +166,7 @@ class pdf_einstein extends ModelePDFCommandes if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index f58b09c0ad7..0b9bdaaa778 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -106,7 +106,7 @@ class html_cerfafr extends ModeleDon if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return -1; diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php index c3e2dd85838..dd0878f55b8 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php @@ -136,7 +136,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$outputlangs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php index 8f9c21ed7d2..cd767e24f1a 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php @@ -116,7 +116,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$outputlangs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 4435a867f1c..addbdeca36a 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -281,7 +281,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return -1; @@ -303,7 +303,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures //print "file=".$file; //print "conf->societe->dir_temp=".$conf->societe->dir_temp; - create_exdir($conf->facture->dir_temp); + dol_mkdir($conf->facture->dir_temp); // If BILLING contact defined on invoice, we use it diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 5a5882c2454..9b8fe8f3aa4 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -168,7 +168,7 @@ class pdf_crabe extends ModelePDFFactures } if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/facture/doc/pdf_oursin.modules.php b/htdocs/core/modules/facture/doc/pdf_oursin.modules.php index 0c43cb2e5e2..80f2b3706a5 100755 --- a/htdocs/core/modules/facture/doc/pdf_oursin.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_oursin.modules.php @@ -157,7 +157,7 @@ class pdf_oursin extends ModelePDFFactures if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 17b15b53a1f..133e9124a57 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -110,7 +110,7 @@ class pdf_soleil extends ModelePDFFicheinter if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php index 302c83c37d1..22b0592b370 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php @@ -109,7 +109,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index 46aa78e38f1..2995e984349 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -131,7 +131,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/mailings/peche.modules.php b/htdocs/core/modules/mailings/peche.modules.php index 18dbb7f9665..b3f857bd93c 100644 --- a/htdocs/core/modules/mailings/peche.modules.php +++ b/htdocs/core/modules/mailings/peche.modules.php @@ -129,7 +129,7 @@ class mailing_peche extends MailingTargets $upload_dir=$conf->mailing->dir_temp; - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['username']['tmp_name'], $upload_dir . "/" . $_FILES['username']['name'], 1, 0, $_FILES['username']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/core/modules/member/cards/pdf_standard.class.php b/htdocs/core/modules/member/cards/pdf_standard.class.php index 85eb6f1f182..e9de0f61667 100644 --- a/htdocs/core/modules/member/cards/pdf_standard.class.php +++ b/htdocs/core/modules/member/cards/pdf_standard.class.php @@ -390,7 +390,7 @@ class pdf_standard { if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/member/labels/pdf_standardlabel.class.php b/htdocs/core/modules/member/labels/pdf_standardlabel.class.php index 583caddfe4d..5664ac9fff9 100644 --- a/htdocs/core/modules/member/labels/pdf_standardlabel.class.php +++ b/htdocs/core/modules/member/labels/pdf_standardlabel.class.php @@ -370,7 +370,7 @@ class pdf_standardlabel { if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 4a3267f1976..7dd86a69b31 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -203,7 +203,7 @@ class modCommande extends DolibarrModules //ODT template require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); $dirodt=DOL_DATA_ROOT.'/doctemplates/orders'; - create_exdir($dirodt); + dol_mkdir($dirodt); $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/orders/template_order.odt'; $dest=$dirodt.'/template_order.odt'; $result=dol_copy($src,$dest,0,0); if ($result < 0) diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 3c2c68b09cc..227c8240bb6 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -219,7 +219,7 @@ class modFacture extends DolibarrModules require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); $dirodt=DOL_DATA_ROOT.'/doctemplates/invoices'; - create_exdir($dirodt); + dol_mkdir($dirodt); $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/invoices/template_invoice.odt'; $dest=$dirodt.'/template_invoice.odt'; $result=dol_copy($src,$dest,0,0); if ($result < 0) diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index d7770bb61fa..091c7fb2eac 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -198,7 +198,7 @@ class modPropale extends DolibarrModules //ODT template require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); $dirodt=DOL_DATA_ROOT.'/doctemplates/proposals'; - create_exdir($dirodt); + dol_mkdir($dirodt); $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/proposals/template_proposal.odt'; $dest=$dirodt.'/template_proposal.odt'; $result=dol_copy($src,$dest,0,0); if ($result < 0) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 0c6161a54cb..111c9dd4c09 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -315,7 +315,7 @@ class modSociete extends DolibarrModules require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); $dirodt=DOL_DATA_ROOT.'/doctemplates/thirdparties'; - create_exdir($dirodt); + dol_mkdir($dirodt); $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/thirdparties/template_thirdparty.odt'; $dest=$dirodt.'/template_thirdparty.odt'; $result=dol_copy($src,$dest,0,0); if ($result < 0) diff --git a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php index 0cb6d713362..75aa75ac154 100644 --- a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php @@ -116,7 +116,7 @@ class pdf_baleine extends ModelePDFProjects if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 1a7afb298cc..5d08f791a08 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -269,7 +269,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return -1; @@ -291,7 +291,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales //print "file=".$file; //print "conf->societe->dir_temp=".$conf->societe->dir_temp; - create_exdir($conf->propale->dir_temp); + dol_mkdir($conf->propale->dir_temp); // If BILLING contact defined on invoice, we use it diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index dd738f59f97..d2df8d79190 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -150,7 +150,7 @@ class pdf_azur extends ModelePDFPropales if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php index a21936d62cf..50977092f3f 100644 --- a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php @@ -150,7 +150,7 @@ class pdf_jaune extends ModelePDFPropales if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 8a1dafdad35..9152cc32b06 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -90,7 +90,7 @@ class pdf_paiement if (! is_dir($dir)) { - $result=create_exdir($dir); + $result=dol_mkdir($dir); if ($result < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 974e0ed4d99..d3848d10e8e 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -201,7 +201,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return -1; @@ -221,7 +221,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc //print "file=".$file; //print "conf->societe->dir_temp=".$conf->societe->dir_temp; - create_exdir($conf->societe->dir_temp); + dol_mkdir($conf->societe->dir_temp); // Open and load template require_once(ODTPHP_PATH.'odf.php'); diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index b7ec8ef2e65..829f6e20420 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -157,7 +157,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 2b6bc096644..7dd01cb4b0d 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -163,7 +163,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if (! file_exists($dir)) { - if (create_exdir($dir) < 0) + if (dol_mkdir($dir) < 0) { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); return 0; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index c334114c61d..a4afc14d612 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -144,7 +144,7 @@ class EcmDirectory // extends CommonObject $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."ecm_directories"); $dir=$conf->ecm->dir_output.'/'.$this->getRelativePath(); - $result=create_exdir($dir); + $result=dol_mkdir($dir); // Appel des triggers include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index fd5b005d2fe..6254e3ad147 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -85,7 +85,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/ecm/docother.php b/htdocs/ecm/docother.php index 40a49587f97..81036df0296 100644 --- a/htdocs/ecm/docother.php +++ b/htdocs/ecm/docother.php @@ -48,7 +48,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 97511b50db8..712f51e2cda 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -96,7 +96,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) $relativepath=$ecmdir->getRelativePath(); $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0, 0, $_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/expedition/stats/month.php b/htdocs/expedition/stats/month.php index 42d898068e9..27e96de17cd 100644 --- a/htdocs/expedition/stats/month.php +++ b/htdocs/expedition/stats/month.php @@ -44,7 +44,7 @@ print_fiche_titre($langs->trans("StatisticsOfSendings").' '.$_GET["year"], $mesg $stats = new ExpeditionStats($db); $data = $stats->getNbExpeditionByMonth($_GET["year"]); -create_exdir($conf->expedition->dir_temp); +dol_mkdir($conf->expedition->dir_temp); $filename = $conf->expedition->dir_temp."/expedition".$year.".png"; $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=expeditionstats&file=expedition'.$year.'.png'; diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index a9a39cc30b1..be142263326 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -73,7 +73,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index 1fb86272c3a..36ccedc67ff 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -78,7 +78,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $upload_dir = $conf->fournisseur->dir_output . "/commande/" . dol_sanitizeFileName($commande->ref); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index aed51380713..5a934218c9f 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -73,7 +73,7 @@ if ($_POST['sendit'] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $ref=dol_sanitizeFileName($facture->ref); $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facture->id,2).$ref; - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 49e1f12726b..c37014a5517 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -93,7 +93,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $relativepath=$ecmdir->getRelativePath(); $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 0e1c09e7cb4..96292a89b52 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -345,7 +345,7 @@ if (! $error && $db->connected && $action == "set") } else { - if (create_exdir($dir[$i]) < 0) + if (dol_mkdir($dir[$i]) < 0) { print "<tr><td>"; print "Failed to create directory: ".$dir[$i]; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index b63dbdc9dbb..918b44add95 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2412,7 +2412,7 @@ class Product extends CommonObject $dir = $sdir .'/'. get_exdir($this->id,2) . $this->id ."/photos"; - create_exdir($dir); + dol_mkdir($dir); $dir_osencoded=$dir; if (is_dir($dir_osencoded)) @@ -2465,7 +2465,7 @@ class Product extends CommonObject if (! file_exists($dir_osencoded)) { dol_syslog("Product Create ".$dir); - create_exdir($dir); + dol_mkdir($dir); } if (file_exists($dir_osencoded)) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index e89b29d18cd..768c2508f0c 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -76,7 +76,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 4fe2de8542a..9d2fc5cbaff 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -71,7 +71,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($project->ref); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 746cc823e32..3b8b260d9ee 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -84,7 +84,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index d81aa99cc76..fe2ec2a24f7 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -73,7 +73,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if ($object->fetch($socid)) { - if (create_exdir($upload_dir) >= 0) + if (dol_mkdir($upload_dir) >= 0) { $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 9edf05eb456..4ebe1a4aeb3 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -258,7 +258,7 @@ if (empty($reshook)) { if (image_format_supported($_FILES['photo']['name'])) { - create_exdir($dir); + dol_mkdir($dir); if (@is_dir($dir)) { @@ -564,7 +564,7 @@ else { if (image_format_supported($_FILES['photo']['name'])) { - create_exdir($dir); + dol_mkdir($dir); if (@is_dir($dir)) { diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index eda9775cc52..f8f6489903c 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -368,7 +368,7 @@ if ($action == 'update' && ! $_POST["cancel"]) { $dir= $conf->user->dir_output . '/' . get_exdir($edituser->id,2,0,1); - create_exdir($dir); + dol_mkdir($dir); if (@is_dir($dir)) { diff --git a/scripts/invoices/rebuild_merge_pdf.php b/scripts/invoices/rebuild_merge_pdf.php index c6487d262f7..842bf467e2f 100644 --- a/scripts/invoices/rebuild_merge_pdf.php +++ b/scripts/invoices/rebuild_merge_pdf.php @@ -324,7 +324,7 @@ if ( $resql=$db->query($sql) ) } // Create output dir if not exists - create_exdir($diroutputpdf); + dol_mkdir($diroutputpdf); // Save merged file $filename='mergedpdf'; -- GitLab