Fix: replace with simple directory
This commit is contained in:
parent
d90438ce37
commit
0a06027c9f
@ -215,12 +215,8 @@ class Conf
|
|||||||
|
|
||||||
// Sous module bons d'expedition
|
// Sous module bons d'expedition
|
||||||
$this->expedition_bon->enabled=defined("MAIN_SUBMODULE_EXPEDITION")?MAIN_SUBMODULE_EXPEDITION:0;
|
$this->expedition_bon->enabled=defined("MAIN_SUBMODULE_EXPEDITION")?MAIN_SUBMODULE_EXPEDITION:0;
|
||||||
$this->expedition_bon->dir_output=$rootfordata."/expedition/sending";
|
|
||||||
$this->expedition_bon->dir_temp =$rootfordata."/expedition/sending/temp";
|
|
||||||
// Sous module bons de livraison
|
// Sous module bons de livraison
|
||||||
$this->livraison_bon->enabled=defined("MAIN_SUBMODULE_LIVRAISON")?MAIN_SUBMODULE_LIVRAISON:0;
|
$this->livraison_bon->enabled=defined("MAIN_SUBMODULE_LIVRAISON")?MAIN_SUBMODULE_LIVRAISON:0;
|
||||||
$this->livraison_bon->dir_output=$rootfordata."/expedition/receipt";
|
|
||||||
$this->livraison_bon->dir_temp =$rootfordata."/expedition/receipt/temp";
|
|
||||||
|
|
||||||
// Module don
|
// Module don
|
||||||
$this->don->dir_output=$rootfordata."/dons";
|
$this->don->dir_output=$rootfordata."/dons";
|
||||||
|
|||||||
@ -248,7 +248,7 @@ if ($modulepart)
|
|||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
$original_file=$conf->expedition_bon->dir_output.'/'.$original_file;
|
$original_file=$conf->expedition->dir_output."/sending/".$original_file;
|
||||||
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ if ($modulepart)
|
|||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
$original_file=$conf->livraison_bon->dir_output.'/'.$original_file;
|
$original_file=$conf->expedition->dir_output."/receipt/".$original_file;
|
||||||
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -848,7 +848,7 @@ else
|
|||||||
if ($conf->expedition_bon->enabled)
|
if ($conf->expedition_bon->enabled)
|
||||||
{
|
{
|
||||||
$expeditionref = dol_sanitizeFileName($expedition->ref);
|
$expeditionref = dol_sanitizeFileName($expedition->ref);
|
||||||
$filedir = $conf->expedition_bon->dir_output . "/" .$expeditionref;
|
$filedir = $conf->expedition->dir_output . "/sending/" .$expeditionref;
|
||||||
|
|
||||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$expedition->id;
|
$urlsource = $_SERVER["PHP_SELF"]."?id=".$expedition->id;
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$this->expe = $object;
|
$this->expe = $object;
|
||||||
|
|
||||||
//Verification de la configuration
|
//Verification de la configuration
|
||||||
if ($conf->expedition_bon->dir_output)
|
if ($conf->expedition->dir_output."/sending")
|
||||||
{
|
{
|
||||||
//Creation du Client
|
//Creation du Client
|
||||||
$soc = new Societe($this->db);
|
$soc = new Societe($this->db);
|
||||||
@ -116,13 +116,13 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
// Definition de $dir et $file
|
// Definition de $dir et $file
|
||||||
if ($object->specimen)
|
if ($object->specimen)
|
||||||
{
|
{
|
||||||
$dir = $conf->expedition_bon->dir_output;
|
$dir = $conf->expedition->dir_output."/sending";
|
||||||
$file = $dir . "/SPECIMEN.pdf";
|
$file = $dir . "/SPECIMEN.pdf";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$expref = dol_sanitizeFileName($object->ref);
|
$expref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->expedition_bon->dir_output . "/" . $expref;
|
$dir = $conf->expedition->dir_output . "/sending/" . $expref;
|
||||||
$file = $dir . "/" . $expref . ".pdf";
|
$file = $dir . "/" . $expref . ".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -237,18 +237,18 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
|
|
||||||
if ($conf->expedition_bon->dir_output)
|
if ($conf->expedition->dir_output."/sending")
|
||||||
{
|
{
|
||||||
// Definition de $dir et $file
|
// Definition de $dir et $file
|
||||||
if ($object->specimen)
|
if ($object->specimen)
|
||||||
{
|
{
|
||||||
$dir = $conf->expedition_bon->dir_output;
|
$dir = $conf->expedition->dir_output."/sending";
|
||||||
$file = $dir . "/SPECIMEN.pdf";
|
$file = $dir . "/SPECIMEN.pdf";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$expref = dol_sanitizeFileName($object->ref);
|
$expref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->expedition_bon->dir_output . "/" . $expref;
|
$dir = $conf->expedition->dir_output."/sending/" . $expref;
|
||||||
$file = $dir . "/" . $expref . ".pdf";
|
$file = $dir . "/" . $expref . ".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
$outputlangs->load("deliveries");
|
$outputlangs->load("deliveries");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
|
||||||
if ($conf->livraison_bon->dir_output)
|
if ($conf->expedition->dir_output."/receipt")
|
||||||
{
|
{
|
||||||
// If $object is id instead of object
|
// If $object is id instead of object
|
||||||
if (! is_object($object))
|
if (! is_object($object))
|
||||||
@ -122,7 +122,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
$nblignes = sizeof($object->lignes);
|
$nblignes = sizeof($object->lignes);
|
||||||
|
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->livraison_bon->dir_output;
|
$dir = $conf->expedition->dir_output."/receipt";
|
||||||
if (! eregi('specimen',$objectref)) $dir.= "/" . $objectref;
|
if (! eregi('specimen',$objectref)) $dir.= "/" . $objectref;
|
||||||
$file = $dir . "/" . $objectref . ".pdf";
|
$file = $dir . "/" . $objectref . ".pdf";
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$outputlangs->load("deliveries");
|
$outputlangs->load("deliveries");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
|
||||||
if ($conf->livraison_bon->dir_output)
|
if ($conf->expedition->dir_output."/receipt")
|
||||||
{
|
{
|
||||||
// If $object is id instead of object
|
// If $object is id instead of object
|
||||||
if (! is_object($object))
|
if (! is_object($object))
|
||||||
@ -143,7 +143,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$nblignes = sizeof($object->lignes);
|
$nblignes = sizeof($object->lignes);
|
||||||
|
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->livraison_bon->dir_output;
|
$dir = $conf->expedition->dir_output."/receipt";
|
||||||
if (! eregi('specimen',$objectref)) $dir.= "/" . $objectref;
|
if (! eregi('specimen',$objectref)) $dir.= "/" . $objectref;
|
||||||
$file = $dir . "/" . $objectref . ".pdf";
|
$file = $dir . "/" . $objectref . ".pdf";
|
||||||
|
|
||||||
|
|||||||
@ -60,39 +60,12 @@ class modExpedition extends DolibarrModules
|
|||||||
$this->picto = "sending";
|
$this->picto = "sending";
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
// TODO Replace with simple directories
|
$this->dirs = array("/expedition/temp",
|
||||||
$this->dirs = array();
|
"/expedition/sending",
|
||||||
$r=0;
|
"/expedition/sending/temp",
|
||||||
|
"/expedition/receipt",
|
||||||
$this->dirs[$r][0] = "output";
|
"/expedition/receipt/temp"
|
||||||
$this->dirs[$r][1] = "/expedition";
|
);
|
||||||
$r++;
|
|
||||||
$this->dirs[$r][0] = "temp";
|
|
||||||
$this->dirs[$r][1] = "/expedition/temp";
|
|
||||||
$r++;
|
|
||||||
$this->dirs[$r][0] = "output";
|
|
||||||
$this->dirs[$r][1] = "/expedition/sending";
|
|
||||||
$this->dirs[$r][2] = 1;
|
|
||||||
$this->dirs[$r][3] = '';
|
|
||||||
$this->dirs[$r][4] = "expedition_bon";
|
|
||||||
$r++;
|
|
||||||
$this->dirs[$r][0] = "temp";
|
|
||||||
$this->dirs[$r][1] = "/expedition/sending/temp";
|
|
||||||
$this->dirs[$r][2] = 1;
|
|
||||||
$this->dirs[$r][3] = '';
|
|
||||||
$this->dirs[$r][4] = "expedition_bon";
|
|
||||||
$r++;
|
|
||||||
$this->dirs[$r][0] = "output";
|
|
||||||
$this->dirs[$r][1] = "/expedition/receipt";
|
|
||||||
$this->dirs[$r][2] = 1;
|
|
||||||
$this->dirs[$r][3] = '';
|
|
||||||
$this->dirs[$r][4] = "livraison_bon";
|
|
||||||
$r++;
|
|
||||||
$this->dirs[$r][0] = "temp";
|
|
||||||
$this->dirs[$r][1] = "/expedition/receipt/temp";
|
|
||||||
$this->dirs[$r][2] = 1;
|
|
||||||
$this->dirs[$r][3] = '';
|
|
||||||
$this->dirs[$r][4] = "livraison_bon";
|
|
||||||
|
|
||||||
// Config pages
|
// Config pages
|
||||||
$this->config_page_url = array("confexped.php");
|
$this->config_page_url = array("confexped.php");
|
||||||
|
|||||||
@ -583,7 +583,7 @@ else
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$livraisonref = dol_sanitizeFileName($livraison->ref);
|
$livraisonref = dol_sanitizeFileName($livraison->ref);
|
||||||
$filedir = $conf->livraison_bon->dir_output . '/' . $livraisonref;
|
$filedir = $conf->expedition->dir_output . "/receipt/" . $livraisonref;
|
||||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$livraison->id;
|
$urlsource = $_SERVER["PHP_SELF"]."?id=".$livraison->id;
|
||||||
|
|
||||||
$genallowed=$user->rights->expedition->livraison->creer;
|
$genallowed=$user->rights->expedition->livraison->creer;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user