Qual: Removed deprecated function name.

This commit is contained in:
Laurent Destailleur 2012-02-19 18:34:22 +01:00
parent e903719c36
commit c4b845d60a
76 changed files with 88 additions and 94 deletions

View File

@ -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)

View File

@ -60,7 +60,7 @@ if ($mode == 'memberbytown') $title=$langs->trans("MembersStatisticsByTown");
print_fiche_titre($title, $mesg);
create_exdir($dir);
dol_mkdir($dir);
if ($mode)
{

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -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']);

View File

@ -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)

View File

@ -1214,7 +1214,7 @@ class Categorie
if (! file_exists($dir))
{
create_exdir($dir);
dol_mkdir($dir);
}
if (file_exists($dir))

View File

@ -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)

View File

@ -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)

View File

@ -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);

View File

@ -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)

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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)

View File

@ -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")));

View File

@ -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));

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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);
}

View File

@ -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

View File

@ -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");

View File

@ -808,7 +808,7 @@ function dol_meta_create($object)
if (! is_dir($dir))
{
create_exdir($dir);
dol_mkdir($dir);
}
if (is_dir($dir))

View File

@ -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++;
}

View File

@ -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])

View File

@ -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);

View File

@ -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;

View File

@ -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';

View File

@ -103,7 +103,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
if (! is_dir($dir))
{
$result=create_exdir($dir);
$result=dol_mkdir($dir);
if ($result < 0)
{

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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');

View File

@ -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;

View File

@ -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;

View File

@ -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");

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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';

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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];

View File

@ -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))

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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';