Qual: Removed deprecated function name.
This commit is contained in:
parent
e903719c36
commit
c4b845d60a
@ -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)
|
||||
|
||||
@ -60,7 +60,7 @@ if ($mode == 'memberbytown') $title=$langs->trans("MembersStatisticsByTown");
|
||||
|
||||
print_fiche_titre($title, $mesg);
|
||||
|
||||
create_exdir($dir);
|
||||
dol_mkdir($dir);
|
||||
|
||||
if ($mode)
|
||||
{
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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']);
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -1214,7 +1214,7 @@ class Categorie
|
||||
|
||||
if (! file_exists($dir))
|
||||
{
|
||||
create_exdir($dir);
|
||||
dol_mkdir($dir);
|
||||
}
|
||||
|
||||
if (file_exists($dir))
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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")));
|
||||
|
||||
@ -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));
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -808,7 +808,7 @@ function dol_meta_create($object)
|
||||
|
||||
if (! is_dir($dir))
|
||||
{
|
||||
create_exdir($dir);
|
||||
dol_mkdir($dir);
|
||||
}
|
||||
|
||||
if (is_dir($dir))
|
||||
|
||||
@ -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++;
|
||||
}
|
||||
|
||||
@ -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])
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
|
||||
if (! is_dir($dir))
|
||||
{
|
||||
$result=create_exdir($dir);
|
||||
$result=dol_mkdir($dir);
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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))
|
||||
{
|
||||
|
||||
@ -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))
|
||||
{
|
||||
|
||||
@ -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';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user