Skip to content
Snippets Groups Projects
Commit dbc211ce authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: current entity by default

Todo: some constant already defined in module ?
parent 9e1100ec
No related branches found
No related tags found
No related merge requests found
...@@ -759,8 +759,7 @@ class DolibarrModules ...@@ -759,8 +759,7 @@ class DolibarrModules
$val = $this->const[$key][2]; $val = $this->const[$key][2];
$note = $this->const[$key][3]; $note = $this->const[$key][3];
$visible= $this->const[$key][4]; $visible= $this->const[$key][4];
$entity = isset($this->const[$key][5])?$this->const[$key][5]:0; $entity = isset($this->const[$key][5])?$this->const[$key][5]:$conf->entity;
$entity = ((!empty($entity) || $entity == '0')?$entity:$conf->entity);
$sql = "SELECT count(*)"; $sql = "SELECT count(*)";
$sql.= " FROM ".MAIN_DB_PREFIX."const"; $sql.= " FROM ".MAIN_DB_PREFIX."const";
......
...@@ -85,6 +85,7 @@ class modProduit extends DolibarrModules ...@@ -85,6 +85,7 @@ class modProduit extends DolibarrModules
$this->const[$r][2] = "1"; $this->const[$r][2] = "1";
$this->const[$r][3] = "Affichage formulaire de recherche des Produits et Services dans la barre de gauche"; $this->const[$r][3] = "Affichage formulaire de recherche des Produits et Services dans la barre de gauche";
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$this->const[$r][5] = 0;
$r++; $r++;
// Boxes // Boxes
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
/** \class modPropale /**
* \class modPropale
* \brief Classe de description et activation du module Propale * \brief Classe de description et activation du module Propale
*/ */
class modPropale extends DolibarrModules class modPropale extends DolibarrModules
......
...@@ -91,6 +91,7 @@ class modSociete extends DolibarrModules ...@@ -91,6 +91,7 @@ class modSociete extends DolibarrModules
$this->const[$r][2] = "1"; $this->const[$r][2] = "1";
$this->const[$r][3] = "Affichage formulaire de recherche des Societes dans la barre de gauche"; $this->const[$r][3] = "Affichage formulaire de recherche des Societes dans la barre de gauche";
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$this->const[$r][5] = 0;
$r++; $r++;
$this->const[$r][0] = "MAIN_SEARCHFORM_CONTACT"; $this->const[$r][0] = "MAIN_SEARCHFORM_CONTACT";
...@@ -98,6 +99,7 @@ class modSociete extends DolibarrModules ...@@ -98,6 +99,7 @@ class modSociete extends DolibarrModules
$this->const[$r][2] = "1"; $this->const[$r][2] = "1";
$this->const[$r][3] = "Affichage formulaire de recherche des Contacts dans la barre de gauche"; $this->const[$r][3] = "Affichage formulaire de recherche des Contacts dans la barre de gauche";
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$this->const[$r][5] = 0;
$r++; $r++;
// Boxes // Boxes
......
...@@ -47,6 +47,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M ...@@ -47,6 +47,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_UPLOAD_DOC','2048','chaine','Max size for file upload (0 means no upload allowed)',0,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_UPLOAD_DOC','2048','chaine','Max size for file upload (0 means no upload allowed)',0,0);
-- TODO deja initialise dans le module ?
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SEARCHFORM_SOCIETE','1','yesno','Show form for quick company search',0,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SEARCHFORM_SOCIETE','1','yesno','Show form for quick company search',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SEARCHFORM_CONTACT','1','yesno','Show form for quick contact search',0,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SEARCHFORM_CONTACT','1','yesno','Show form for quick contact search',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SEARCHFORM_PRODUITSERVICE' ,'1','yesno','Show form for quick product search',0,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SEARCHFORM_PRODUITSERVICE' ,'1','yesno','Show form for quick product search',0,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment