diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 715f01f43e0231c7cc6721eb579e6d5efd9e653f..1f91c3a896068d69eb5457fcc565dbc34bed8e97 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -121,20 +121,21 @@ class modMyModule extends DolibarrModules $this->tabs = array(); // Dictionnaries - $this->dictionnaries=array(); + if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0; + $this->dictionnaries=array(); /* Example: - if (! isset($conf->cabinetmed->enabled)) $conf->cabinetmed->enabled=0; // This is to avoid warnings + if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0; // This is to avoid warnings $this->dictionnaries=array( - 'langs'=>'cabinetmed@cabinetmed', - 'tabname'=>array(MAIN_DB_PREFIX."cabinetmed_diaglec",MAIN_DB_PREFIX."cabinetmed_examenprescrit",MAIN_DB_PREFIX."cabinetmed_motifcons"), // List of tables we want dictonnary on - 'tablib'=>array("DiagnostiqueLesionnel","ExamenPrescrit","MotifConsultation"), // Label of tables - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'cabinetmed_diaglec as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'cabinetmed_examenprescrit as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'cabinetmed_motifcons as f'), // Request to select fields + 'langs'=>'mymodule@mymodule', + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor + 'tablib'=>array("Table1","Table2","Table3"), // Label of tables + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionnary) 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->cabinetmed->enabled,$conf->cabinetmed->enabled,$conf->cabinetmed->enabled) // Condition to show each dictionnary + 'tabcond'=>array($conf->mymodule->enabled,$conf->mymodule->enabled,$conf->mymodule->enabled) // Condition to show each dictionnary ); */ diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 47a10261d6cc0621cd9cac058cb9f245ce93ad44..0f4d1d14b55123bc3602ccb964a7e053df37df05 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -676,7 +676,7 @@ function dol_syslog($message, $level=LOG_INFO) * Show tab header of a card * * @param array $links Array of tabs - * @param int $active Active tab name + * @param string $active Active tab name (document', 'info', 'ldap', ....) * @param string $title Title * @param int $notab 0=Add tab header, 1=no tab header * @param string $picto Add a picto on tab title