New: parametre de config des repertoires dans les proprietes de la classe du module
avec un rpertoire parent en fonction de l'entit Fix: uniformisation propal to propale
This commit is contained in:
parent
46ff461816
commit
a20b4643df
@ -499,7 +499,7 @@ print "<tr class=\"liste_titre\">\n";
|
||||
print " <td>".$langs->trans("Name")."</td>\n";
|
||||
print " <td>".$langs->trans("Value")."</td>\n";
|
||||
print "</tr>\n";
|
||||
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propal->dir_output."</td>\n</tr>\n";
|
||||
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propale->dir_output."</td>\n</tr>\n";
|
||||
print "</table>\n<br>";
|
||||
|
||||
|
||||
|
||||
@ -305,7 +305,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
print '</td>';
|
||||
print '<td width="16" align="center" class="nobordernopadding">';
|
||||
$filename=sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propale->dir_output . '/' . sanitizeFileName($objp->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid;
|
||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
||||
print '</td></tr></table>';
|
||||
@ -504,7 +504,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
print '</td>';
|
||||
print '<td width="16" align="center" class="nobordernopadding">';
|
||||
$filename=sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->propale->dir_output . '/' . sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$obj->propalid;
|
||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
||||
print '</td></tr></table>';
|
||||
|
||||
@ -405,7 +405,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel'])
|
||||
if ( $propal->fetch($_POST['propalid']) )
|
||||
{
|
||||
$propalref = sanitizeFileName($propal->ref);
|
||||
$file = $conf->propal->dir_output . '/' . $propalref . '/' . $propalref . '.pdf';
|
||||
$file = $conf->propale->dir_output . '/' . $propalref . '/' . $propalref . '.pdf';
|
||||
|
||||
if (is_readable($file))
|
||||
{
|
||||
@ -1786,7 +1786,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($propal->statut == 1 && $user->rights->propale->envoyer)
|
||||
{
|
||||
$propref = sanitizeFileName($propal->ref);
|
||||
$file = $conf->propal->dir_output . '/'.$propref.'/'.$propref.'.pdf';
|
||||
$file = $conf->propale->dir_output . '/'.$propref.'/'.$propref.'.pdf';
|
||||
if (file_exists($file))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=presend&mode=init">'.$langs->trans('SendByMail').'</a>';
|
||||
@ -1850,7 +1850,7 @@ if ($id > 0 || ! empty($ref))
|
||||
* Documents generes
|
||||
*/
|
||||
$filename=sanitizeFileName($propal->ref);
|
||||
$filedir=$conf->propal->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
$filedir=$conf->propale->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?propalid=".$propal->id;
|
||||
$genallowed=$user->rights->propale->creer;
|
||||
$delallowed=$user->rights->propale->supprimer;
|
||||
@ -1911,7 +1911,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($_GET['action'] == 'presend')
|
||||
{
|
||||
$ref = sanitizeFileName($propal->ref);
|
||||
$file = $conf->propal->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
||||
$file = $conf->propale->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
||||
|
||||
print '<br>';
|
||||
print_titre($langs->trans('SendPropalByMail'));
|
||||
@ -2116,7 +2116,7 @@ else
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
|
||||
$filename=sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propale->dir_output . '/' . sanitizeFileName($objp->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid;
|
||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ if ($_GET["propalid"] > 0)
|
||||
* Documents
|
||||
*/
|
||||
$propalref = sanitizeFileName($propal->ref);
|
||||
$dir_output = $conf->propal->dir_output . "/";
|
||||
$dir_output = $conf->propale->dir_output . "/";
|
||||
$filepath = $dir_output . $propalref . "/";
|
||||
$file = $filepath . $propalref . ".pdf";
|
||||
$filedetail = $filepath . $propalref . "-detail.pdf";
|
||||
|
||||
@ -72,7 +72,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
|
||||
if ($propal->fetch($propalid))
|
||||
{
|
||||
$upload_dir = $conf->propal->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
$upload_dir = $conf->propale->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
||||
|
||||
if (is_dir($upload_dir))
|
||||
@ -100,7 +100,7 @@ if ($action=='delete')
|
||||
$propalid=$_GET["id"];
|
||||
if ($propal->fetch($propalid))
|
||||
{
|
||||
$upload_dir = $conf->propal->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
$upload_dir = $conf->propale->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
$file = $upload_dir . '/' . urldecode($_GET['urlfile']);
|
||||
dol_delete_file($file);
|
||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
||||
@ -119,7 +119,7 @@ if ($propalid > 0)
|
||||
$propal = new Propal($db);
|
||||
if ($propal->fetch($propalid))
|
||||
{
|
||||
$upload_dir = $conf->propal->dir_output.'/'.sanitizeFileName($propal->ref);
|
||||
$upload_dir = $conf->propale->dir_output.'/'.sanitizeFileName($propal->ref);
|
||||
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch($propal->socid);
|
||||
|
||||
@ -51,7 +51,7 @@ llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg);
|
||||
|
||||
$dir=$conf->propal->dir_temp;
|
||||
$dir=$conf->propale->dir_temp;
|
||||
|
||||
create_exdir($dir);
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ $year = isset($_GET["year"])?$_GET["year"]:date("Y",time());
|
||||
|
||||
llxHeader();
|
||||
|
||||
$dir=$conf->propal->dir_temp;
|
||||
$dir=$conf->propale->dir_temp;
|
||||
|
||||
$mesg = '<a href="month.php?year='.($year - 1).'">'.img_previous().'</a> ';
|
||||
$mesg.= $langs->trans("Year")." $year";
|
||||
|
||||
@ -492,7 +492,7 @@ if ($id > 0 || ! empty($ref))
|
||||
* Documents generes
|
||||
*/
|
||||
$filename=sanitizeFileName($propal->ref);
|
||||
$filedir=$conf->propal->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
$filedir=$conf->propale->dir_output . "/" . sanitizeFileName($propal->ref);
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?propalid=".$propal->id;
|
||||
$genallowed=0;
|
||||
$delallowed=0;
|
||||
@ -774,7 +774,7 @@ else
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
|
||||
$filename=sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propale->dir_output . '/' . sanitizeFileName($objp->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid;
|
||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
||||
|
||||
|
||||
@ -155,20 +155,9 @@ class Conf
|
||||
$this->webcal->enabled=defined('MAIN_MODULE_WEBCALENDAR')?MAIN_MODULE_WEBCALENDAR:0;
|
||||
$this->propal->enabled=defined("MAIN_MODULE_PROPALE")?MAIN_MODULE_PROPALE:0;
|
||||
|
||||
// Module agenda
|
||||
$this->agenda->dir_temp=DOL_DATA_ROOT."/agenda/temp";
|
||||
|
||||
// Module externalrss
|
||||
$this->externalrss->dir_temp=DOL_DATA_ROOT."/rss/temp";
|
||||
|
||||
// Module commande client
|
||||
$this->commande->dir_output=DOL_DATA_ROOT."/commande";
|
||||
$this->commande->dir_temp =DOL_DATA_ROOT."/commande/temp";
|
||||
|
||||
// Module expeditions
|
||||
$this->expedition->dir_output=DOL_DATA_ROOT."/expedition";
|
||||
$this->expedition->dir_temp =DOL_DATA_ROOT."/expedition/temp";
|
||||
|
||||
// Sous module bons d'expedition
|
||||
$this->expedition_bon->enabled=defined("MAIN_SUBMODULE_EXPEDITION")?MAIN_SUBMODULE_EXPEDITION:0;
|
||||
$this->expedition_bon->dir_output=DOL_DATA_ROOT."/expedition/sending";
|
||||
@ -183,23 +172,11 @@ class Conf
|
||||
$this->societe->dir_temp =DOL_DATA_ROOT."/societe/temp";
|
||||
$this->societe->dir_logos =DOL_DATA_ROOT."/societe/logos";
|
||||
if (defined('SOCIETE_OUTPUTDIR') && SOCIETE_OUTPUTDIR) { $this->societe->dir_output=SOCIETE_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
// Module commercial
|
||||
$this->commercial->dir_output=DOL_DATA_ROOT."/comm";
|
||||
$this->commercial->dir_temp =DOL_DATA_ROOT."/comm/temp";
|
||||
|
||||
// Module taxes et charges sociales
|
||||
$this->tax->dir_output=DOL_DATA_ROOT."/taxes";
|
||||
$this->tax->dir_temp =DOL_DATA_ROOT."/taxes/temp";
|
||||
|
||||
// Module comptaexpert
|
||||
$this->comptaexpert->dir_output=DOL_DATA_ROOT."/comptaexpert";
|
||||
$this->comptaexpert->dir_temp =DOL_DATA_ROOT."/comptaexpert/temp";
|
||||
// Module compta
|
||||
$this->compta->dir_output=DOL_DATA_ROOT."/compta";
|
||||
$this->compta->dir_temp =DOL_DATA_ROOT."/compta/temp";
|
||||
// Module banque
|
||||
$this->banque->dir_output=DOL_DATA_ROOT."/banque";
|
||||
$this->banque->dir_temp =DOL_DATA_ROOT."/banque/temp";
|
||||
// Module don
|
||||
$this->don->dir_output=DOL_DATA_ROOT."/dons";
|
||||
$this->don->dir_temp =DOL_DATA_ROOT."/dons/temp";
|
||||
@ -214,17 +191,13 @@ class Conf
|
||||
$this->fichinter->dir_output=DOL_DATA_ROOT."/ficheinter";
|
||||
$this->fichinter->dir_temp =DOL_DATA_ROOT."/ficheinter/temp";
|
||||
if (defined('FICHEINTER_OUTPUTDIR') && FICHEINTER_OUTPUTDIR) { $this->fichinter->dir_output=FICHEINTER_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
// Module adherent
|
||||
$this->adherent->dir_output=DOL_DATA_ROOT."/adherent";
|
||||
$this->adherent->dir_tmp=DOL_DATA_ROOT."/adherent/temp";
|
||||
// Module produit
|
||||
$this->produit->MultiPricesEnabled=defined("PRODUIT_MULTIPRICES")?PRODUIT_MULTIPRICES:0;
|
||||
// Module droipret
|
||||
$this->droitpret->cat=defined('DROITPRET_CAT')?DROITPRET_CAT:'';
|
||||
$this->droitpret->cat=defined('DROITPRET_MAIL')?DROITPRET_MAIL:'';
|
||||
$this->droitpret->dir_temp=DOL_DATA_ROOT."/droitpret/temp";
|
||||
// Module contrat
|
||||
$this->contrat->dir_output=DOL_DATA_ROOT."/contracts";
|
||||
|
||||
// Module prelevement
|
||||
$this->prelevement->dir_output=DOL_DATA_ROOT."/prelevement";
|
||||
$this->prelevement->dir_temp =DOL_DATA_ROOT."/prelevement/temp";
|
||||
@ -251,15 +224,14 @@ class Conf
|
||||
$this->mantis->db->user=defined('PHPMANTIS_USER')?PHPMANTIS_USER:'';
|
||||
$this->mantis->db->pass=defined('PHPMANTIS_PASS')?PHPMANTIS_PASS:'';
|
||||
$this->mantis->db->name=defined('PHPMANTIS_DBNAME')?PHPMANTIS_DBNAME:'';
|
||||
|
||||
// Module facture
|
||||
$this->facture->dir_output=DOL_DATA_ROOT."/facture";
|
||||
$this->facture->dir_temp =DOL_DATA_ROOT."/facture/temp";
|
||||
if (defined('FAC_OUTPUTDIR') && FAC_OUTPUTDIR) { $this->facture->dir_output=FAC_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
|
||||
// Module propal
|
||||
if (! defined("PROPALE_NEW_FORM_NB_PRODUCT")) define("PROPALE_NEW_FORM_NB_PRODUCT", 4);
|
||||
$this->propal->dir_output=DOL_DATA_ROOT."/propale";
|
||||
$this->propal->dir_temp =DOL_DATA_ROOT."/propale/temp";
|
||||
if (defined('PROPALE_OUTPUTDIR') && PROPALE_OUTPUTDIR) { $this->propal->dir_output=PROPALE_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
if (defined('PROPALE_OUTPUTDIR') && PROPALE_OUTPUTDIR) { $this->propale->dir_output=PROPALE_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
|
||||
// Module telephonie
|
||||
$this->telephonie->dir_output=DOL_DATA_ROOT."/telephonie";
|
||||
$this->telephonie->dir_temp =DOL_DATA_ROOT."/telephonie/temp";
|
||||
|
||||
@ -157,7 +157,7 @@ if ($modulepart)
|
||||
$accessallowed=1;
|
||||
}
|
||||
|
||||
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
||||
$original_file=$conf->propale->dir_output.'/'.$original_file;
|
||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."propal WHERE ref='$refname'";
|
||||
}
|
||||
// Wrapping pour les commandes
|
||||
|
||||
@ -60,9 +60,16 @@ class modAdherent extends DolibarrModules
|
||||
$this->special = 0;
|
||||
$this->picto='user';
|
||||
|
||||
// Dir
|
||||
//----
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/adherent";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/adherent/temp";
|
||||
|
||||
// Config pages
|
||||
//-------------
|
||||
|
||||
@ -62,11 +62,16 @@ class modAgenda extends DolibarrModules
|
||||
$this->special = 0;
|
||||
$this->picto='calendar';
|
||||
|
||||
// Dir
|
||||
//----
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
//$this->dirs[0] = DOL_DATA_ROOT.'/mymodule;
|
||||
//$this->dirs[1] = DOL_DATA_ROOT.'/mymodule/temp;
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/agenda";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/agenda/temp";
|
||||
|
||||
// Config pages
|
||||
//-------------
|
||||
|
||||
@ -63,6 +63,17 @@ class modBanque extends DolibarrModules
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 0;
|
||||
$this->picto='account';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/banque";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/banque/temp";
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array();
|
||||
|
||||
@ -43,7 +43,7 @@ class modBoutique extends DolibarrModules
|
||||
|
||||
/**
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'acc<EFBFBD>s base
|
||||
* \param DB handler d'acces base
|
||||
*/
|
||||
function modBoutique($DB)
|
||||
{
|
||||
@ -65,7 +65,7 @@ class modBoutique extends DolibarrModules
|
||||
// $this->config_page_url = array("boutique.php","osc-languages.php");
|
||||
$this->config_page_url = array("boutique.php");
|
||||
|
||||
// D<EFBFBD>pendances
|
||||
// Dependances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array("modOSCommerceWS");
|
||||
@ -83,8 +83,8 @@ class modBoutique extends DolibarrModules
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction appel<EFBFBD>e lors de l'activation du module. Ins<EFBFBD>re en base les constantes, boites, permissions du module.
|
||||
* D<EFBFBD>finit <EFBFBD>galement les r<EFBFBD>pertoires de donn<EFBFBD>es <EFBFBD> cr<EFBFBD>er pour ce module.
|
||||
* \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module.
|
||||
* Definit egalement les repertoires de donnees a creer pour ce module.
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
@ -94,7 +94,7 @@ class modBoutique extends DolibarrModules
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction appel<EFBFBD>e lors de la d<EFBFBD>sactivation d'un module.
|
||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
|
||||
@ -63,8 +63,16 @@ class modCommande extends DolibarrModules
|
||||
$this->special = 0;
|
||||
$this->picto='order';
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/commande";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/commande/temp";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("commande.php");
|
||||
|
||||
@ -46,23 +46,31 @@ class modCommercial extends DolibarrModules
|
||||
*/
|
||||
function modCommercial($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 2 ;
|
||||
$this->db = $DB ;
|
||||
$this->numero = 2 ;
|
||||
|
||||
$this->family = "crm";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = eregi_replace('^mod','',get_class($this));
|
||||
$this->description = "Gestion commercial";
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = 'dolibarr';
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 0;
|
||||
$this->picto='commercial';
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
$this->family = "crm";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = eregi_replace('^mod','',get_class($this));
|
||||
$this->description = "Gestion commercial";
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = 'dolibarr';
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 0;
|
||||
$this->picto='commercial';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/comm";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/comm/temp";
|
||||
|
||||
// Dependancies
|
||||
$this->depends = array("modSociete");
|
||||
|
||||
@ -66,7 +66,7 @@ class modComptabilite extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("compta.php");
|
||||
|
||||
// D<EFBFBD>pendances
|
||||
// Dependances
|
||||
$this->depends = array("modFacture","modBanque");
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array("modComptabiliteExpert");
|
||||
@ -74,13 +74,25 @@ class modComptabilite extends DolibarrModules
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// R<EFBFBD>pertoires
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$this->dirs[0] = $conf->compta->dir_output;
|
||||
$this->dirs[1] = $conf->compta->dir_output."/rapport";
|
||||
$this->dirs[2] = $conf->compta->dir_output."/export";
|
||||
$this->dirs[3] = $conf->compta->dir_temp;
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/compta";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/compta/temp";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "rapport";
|
||||
$this->dirs[$r][1] = "/compta/rapport";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "export";
|
||||
$this->dirs[$r][1] = "/compta/export";
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
@ -75,6 +75,25 @@ class modComptabiliteExpert extends DolibarrModules
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/comptaexpert";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/comptaexpert/temp";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "rapport";
|
||||
$this->dirs[$r][1] = "/comptaexpert/rapport";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "export";
|
||||
$this->dirs[$r][1] = "/comptaexpert/export";
|
||||
|
||||
// Repertoires
|
||||
$this->dirs = array();
|
||||
|
||||
@ -61,10 +61,18 @@ class modContrat extends DolibarrModules
|
||||
$this->special = 0;
|
||||
$this->picto='contract';
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/contracts";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/contracts/temp";
|
||||
|
||||
// D<>pendances
|
||||
// Dependances
|
||||
$this->depends = array("modService");
|
||||
$this->requiredby = array();
|
||||
|
||||
|
||||
@ -58,8 +58,16 @@ class modExpedition extends DolibarrModules
|
||||
$this->special = 0;
|
||||
$this->picto = "sending";
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/expedition";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/expedition/temp";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("confexped.php");
|
||||
|
||||
@ -64,8 +64,16 @@ class modFacture extends DolibarrModules
|
||||
$this->special = 0;
|
||||
$this->picto='bill';
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/facture";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/facture/temp";
|
||||
|
||||
// Dependencies
|
||||
$this->depends = array("modSociete");
|
||||
|
||||
@ -63,8 +63,16 @@ class modPropale extends DolibarrModules
|
||||
$this->special = 0;
|
||||
$this->picto='propal';
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/propale";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/propale/temp";
|
||||
|
||||
// Dependances
|
||||
$this->depends = array("modSociete","modCommercial");
|
||||
@ -143,8 +151,8 @@ class modPropale extends DolibarrModules
|
||||
$this->remove();
|
||||
|
||||
// Repertoires
|
||||
$this->dirs[0] = $conf->propal->dir_output;
|
||||
$this->dirs[1] = $conf->propal->dir_temp;
|
||||
$this->dirs[0] = $conf->propale->dir_output;
|
||||
$this->dirs[1] = $conf->propale->dir_temp;
|
||||
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||
|
||||
@ -250,10 +250,10 @@ function propale_delete_preview($db, $propalid, $propalref='')
|
||||
$propalref = $propal->ref;
|
||||
}
|
||||
|
||||
if ($conf->propal->dir_output)
|
||||
if ($conf->propale->dir_output)
|
||||
{
|
||||
$propalref = sanitizeFileName($propalref);
|
||||
$dir = $conf->propal->dir_output . "/" . $propalref ;
|
||||
$dir = $conf->propale->dir_output . "/" . $propalref ;
|
||||
$file = $dir . "/" . $propalref . ".pdf.png";
|
||||
$multiple = $file . ".";
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
if ($conf->propal->dir_output)
|
||||
if ($conf->propale->dir_output)
|
||||
{
|
||||
// Définition de l'objet $propale (pour compatibilite ascendante)
|
||||
if (! is_object($propale))
|
||||
@ -138,13 +138,13 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
// Définition de $dir et $file
|
||||
if ($propale->specimen)
|
||||
{
|
||||
$dir = $conf->propal->dir_output;
|
||||
$dir = $conf->propale->dir_output;
|
||||
$file = $dir . "/SPECIMEN.pdf";
|
||||
}
|
||||
else
|
||||
{
|
||||
$propref = sanitizeFileName($propale->ref);
|
||||
$dir = $conf->propal->dir_output . "/" . $propref;
|
||||
$dir = $conf->propale->dir_output . "/" . $propref;
|
||||
$file = $dir . "/" . $propref . ".pdf";
|
||||
}
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
if ($conf->propal->dir_output)
|
||||
if ($conf->propale->dir_output)
|
||||
{
|
||||
// D<>finition de l'objet $propal (pour compatibilite ascendante)
|
||||
if (! is_object($propale))
|
||||
@ -122,13 +122,13 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
// Definition de $dir et $file
|
||||
if ($propale->specimen)
|
||||
{
|
||||
$dir = $conf->propal->dir_output;
|
||||
$dir = $conf->propale->dir_output;
|
||||
$file = $dir . "/SPECIMEN.pdf";
|
||||
}
|
||||
else
|
||||
{
|
||||
$propref = sanitizeFileName($propale->ref);
|
||||
$dir = $conf->propal->dir_output . "/" . $propref;
|
||||
$dir = $conf->propale->dir_output . "/" . $propref;
|
||||
$file = $dir . "/" . $propref . ".pdf";
|
||||
}
|
||||
|
||||
|
||||
@ -1495,10 +1495,10 @@ class Propal extends CommonObject
|
||||
{
|
||||
// We remove directory
|
||||
$propalref = sanitizeFileName($this->ref);
|
||||
if ($conf->propal->dir_output)
|
||||
if ($conf->propale->dir_output)
|
||||
{
|
||||
$dir = $conf->propal->dir_output . "/" . $propalref ;
|
||||
$file = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . ".pdf";
|
||||
$dir = $conf->propale->dir_output . "/" . $propalref ;
|
||||
$file = $conf->propale->dir_output . "/" . $propalref . "/" . $propalref . ".pdf";
|
||||
if (file_exists($file))
|
||||
{
|
||||
propale_delete_preview($this->db, $this->id, $this->ref);
|
||||
|
||||
@ -110,7 +110,7 @@ if ($modulepart)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
||||
$original_file=$conf->propale->dir_output.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les apercu commande
|
||||
@ -143,7 +143,7 @@ if ($modulepart)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->propal->dir_temp.'/'.$original_file;
|
||||
$original_file=$conf->propale->dir_temp.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les images des stats commandes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user