Doc: Plus de commentaires pour mieux comprendre la fonction
This commit is contained in:
parent
56dedb7ed5
commit
2e558150c1
@ -66,20 +66,27 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
if ( $result )
|
if ( $result )
|
||||||
{
|
{
|
||||||
|
// Efface rep obsolete
|
||||||
|
if(is_dir(DOL_DOCUMENT_ROOT."/document/produits"))
|
||||||
|
rmdir(DOL_DOCUMENT_ROOT."/document/produits");
|
||||||
|
|
||||||
|
// Création répertoire pour images générées
|
||||||
$dir = DOL_DOCUMENT_ROOT."/document/produit/".$product->id;
|
$dir = DOL_DOCUMENT_ROOT."/document/produit/".$product->id;
|
||||||
if (! file_exists($dir))
|
if (! file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|
||||||
umask(0);
|
umask(0);
|
||||||
if(is_dir(DOL_DOCUMENT_ROOT."/document/produits"))
|
if(!file_exists(DOL_DOCUMENT_ROOT."/document/produit")) {
|
||||||
rmdir(DOL_DOCUMENT_ROOT."/document/produits");
|
mkdir(DOL_DOCUMENT_ROOT."/document");
|
||||||
//mkdir(DOL_DOCUMENT_ROOT."/document");
|
|
||||||
if(!file_exists(DOL_DOCUMENT_ROOT."/document/produit"))
|
|
||||||
mkdir(DOL_DOCUMENT_ROOT."/document/produit");
|
mkdir(DOL_DOCUMENT_ROOT."/document/produit");
|
||||||
|
}
|
||||||
if (! mkdir($dir, 0755))
|
if (! mkdir($dir, 0755))
|
||||||
{
|
{
|
||||||
$mesg = $langs->trans("ErrorCanNotCreateDir",$dir);
|
$mesg = $langs->trans("ErrorCanNotCreateDir",$dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$img_propal_name = "propal12mois.png";
|
$img_propal_name = "propal12mois.png";
|
||||||
$filenbpropal = $dir . "/" . $img_propal_name;
|
$filenbpropal = $dir . "/" . $img_propal_name;
|
||||||
$filenbvente = $dir . "/vente12mois.png";
|
$filenbvente = $dir . "/vente12mois.png";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user