diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index eb24e30972f..7681f1a4c23 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -71,7 +71,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) /* * Creation repertoire si n'existe pas */ - $upload_dir = $conf->actions->dir_output.'/'.sanitizeFileName($objectid); + $upload_dir = $conf->commercial->dir_actions.'/'.sanitizeFileName($objectid); if (! is_dir($upload_dir)) create_exdir($upload_dir); if (is_dir($upload_dir)) @@ -95,7 +95,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) */ if ($_GET["action"] == 'delete') { - $upload_dir = $conf->actions->dir_output.'/'.sanitizeFileName($objectid); + $upload_dir = $conf->commercial->dir_actions.'/'.sanitizeFileName($objectid); $file = $upload_dir . '/' . urldecode($_GET['urlfile']); dol_delete_file($file); } @@ -113,7 +113,7 @@ if ($objectid > 0) $act = new ActionComm($db); if ($act->fetch($objectid)) { - $upload_dir = $conf->actions->dir_output.'/'.sanitizeFileName($objectid); + $upload_dir = $conf->commercial->dir_actions.'/'.sanitizeFileName($objectid); $company=new Societe($db); $company->fetch($act->societe->id); diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 30bca16ab21..19b4bae589e 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -107,7 +107,7 @@ if ($resql) $name = "actions-".$obj->month."-".$obj->year.".pdf"; $relativepath= $name; - $file = $conf->actions->dir_temp."/".$name; + $file = $conf->commercial->dir_actions_temp."/".$name; if (file_exists($file)) { diff --git a/htdocs/core/conf.class.php b/htdocs/core/conf.class.php index e9907bea221..826e0e1ad53 100644 --- a/htdocs/core/conf.class.php +++ b/htdocs/core/conf.class.php @@ -207,10 +207,7 @@ class Conf $this->domaine->enabled=0; // Module voyage $this->voyage->enabled=0; - // Module actions - $this->actions->dir_output=DOL_DATA_ROOT."/action"; - $this->actions->dir_temp =DOL_DATA_ROOT."/action/temp"; - + // Module oscommerce 1 $this->boutique->livre->enabled=defined("BOUTIQUE_LIVRE")?BOUTIQUE_LIVRE:0; $this->boutique->album->enabled=defined("BOUTIQUE_ALBUM")?BOUTIQUE_ALBUM:0; diff --git a/htdocs/document.php b/htdocs/document.php index aafbf242acd..0c5f5127f97 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -276,7 +276,7 @@ if ($modulepart) //{ $accessallowed=1; //} - $original_file=$conf->actions->dir_output.'/'.$original_file; + $original_file=$conf->commercial->dir_actions.'/'.$original_file; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'"; } @@ -288,7 +288,7 @@ if ($modulepart) //{ $accessallowed=1; //} - $original_file = $conf->actions->dir_temp."/".$original_file; + $original_file = $conf->commercial->dir_actions_temp."/".$original_file; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'"; } diff --git a/htdocs/includes/modules/action/rapport.pdf.php b/htdocs/includes/modules/action/rapport.pdf.php index 70ea7341f20..8e7c1506700 100644 --- a/htdocs/includes/modules/action/rapport.pdf.php +++ b/htdocs/includes/modules/action/rapport.pdf.php @@ -1,6 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -105,7 +106,7 @@ class CommActionRapport $pdf=new FPDI_Protection('P','mm',$this->format); $pdfrights = array('print'); // Ne permet que l'impression du document $pdfuserpass = ''; // Mot de passe pour l'utilisateur final - $pdfownerpass = NULL; // Mot de passe du proprietire, cree aleatoirement si pas defini + $pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini $pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass); } else diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php index dc7a243103f..e2784266d39 100644 --- a/htdocs/includes/modules/modCommercial.class.php +++ b/htdocs/includes/modules/modCommercial.class.php @@ -40,63 +40,70 @@ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); class modCommercial extends DolibarrModules { - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB Database handler - */ - function modCommercial($DB) - { - $this->db = $DB ; - $this->numero = 2 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB Database handler + */ + function modCommercial($DB) + { + $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"; + $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'; + // 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'; + $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; + // Data directories to create when module is enabled + $this->dirs = array(); + $r=0; - $this->dirs[$r][0] = "output"; - $this->dirs[$r][1] = "/comm"; + $this->dirs[$r][0] = "output"; + $this->dirs[$r][1] = "/comm"; - $r++; - $this->dirs[$r][0] = "temp"; - $this->dirs[$r][1] = "/comm/temp"; + $r++; + $this->dirs[$r][0] = "temp"; + $this->dirs[$r][1] = "/comm/temp"; + + $r++; + $this->dirs[$r][0] = "actions"; + $this->dirs[$r][1] = "/action"; + + $r++; + $this->dirs[$r][0] = "actions_temp"; + $this->dirs[$r][1] = "/action/temp"; - // Dependancies - $this->depends = array("modSociete"); - $this->requiredby = array("modPropale","modContrat","modCommande","modFicheinter"); + // Dependancies + $this->depends = array("modSociete"); + $this->requiredby = array("modPropale","modContrat","modCommande","modFicheinter"); - // Constantes - $this->const = array(); + // Constantes + $this->const = array(); - // Boxes - $this->boxes = array(); + // Boxes + $this->boxes = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'commercial'; - $r = 1; + // Permissions + $this->rights = array(); + $this->rights_class = 'commercial'; + $r = 1; - // 261 : Permission generale - $this->rights[$r][0] = 261; - $this->rights[$r][1] = 'Consulter menu commercial'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'main'; - $this->rights[$r][5] = 'lire'; - $r++; - } + // 261 : Permission generale + $this->rights[$r][0] = 261; + $this->rights[$r][1] = 'Consulter menu commercial'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'main'; + $this->rights[$r][5] = 'lire'; + $r++; + } /** * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. @@ -104,12 +111,12 @@ class modCommercial extends DolibarrModules */ function init() { - // Permissions - $this->remove(); + // Permissions + $this->remove(); - $sql = array(); + $sql = array(); - return $this->_init($sql); + return $this->_init($sql); } /** @@ -118,9 +125,9 @@ class modCommercial extends DolibarrModules */ function remove() { - $sql = array(); + $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql); } } ?>