Clean deprecated code (property "special" removed from mod descriptor)

This commit is contained in:
Laurent Destailleur 2018-02-25 10:55:02 +01:00
parent c604ce0a06
commit 029ef534d0
79 changed files with 130 additions and 245 deletions

View File

@ -163,8 +163,6 @@ foreach ($modulesdir as $dir)
$modules[$i] = $objMod;
$filename[$i]= $modName;
$special = $objMod->special;
// Gives the possibility to the module, to provide his own family info and position of this family
if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
if (!is_array($familyinfo)) $familyinfo=array();
@ -180,13 +178,11 @@ foreach ($modulesdir as $dir)
$moduleposition = 800;
}
if ($special == 1) $familykey='interface';
$orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number
$dirmod[$i] = $dir;
//print $i.'-'.$dirmod[$i].'<br>';
// Set categ[$i]
$specialstring = isset($specialtostring[$special])?$specialtostring[$special]:'unknown';
$specialstring = 'unknown';
if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring='expdev';
if (isset($categ[$specialstring])) $categ[$specialstring]++; // Array of all different modules categories
else $categ[$specialstring]=1;
@ -240,7 +236,6 @@ foreach($orders as $tmpkey => $tmpvalue)
$i++;
}
$value = $orders[$key];
$special = $objMod->special;
$tab=explode('_',$value);
$familyposition=$tab[0]; $familykey=$tab[1]; $module_position=$tab[2]; $numero=$tab[3];

View File

@ -358,8 +358,6 @@ foreach ($modulesdir as $dir)
$filename[$i]= $modName;
$modules[$modName] = $objMod;
$special = $objMod->special;
// Gives the possibility to the module, to provide his own family info and position of this family
if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
$familyinfo = array_merge($familyinfo, $objMod->familyinfo);
@ -374,8 +372,6 @@ foreach ($modulesdir as $dir)
$moduleposition = 800;
}
if ($special == 1) $familykey='interface';
// Add list of warnings to show into arrayofwarnings and arrayofwarningsext
if (! empty($objMod->warnings_activation))
{
@ -390,7 +386,7 @@ foreach ($modulesdir as $dir)
$dirmod[$i] = $dir;
//print $i.'-'.$dirmod[$i].'<br>';
// Set categ[$i]
$specialstring = isset($specialtostring[$special])?$specialtostring[$special]:'unknown';
$specialstring = 'unknown';
if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring='expdev';
if (isset($categ[$specialstring])) $categ[$specialstring]++; // Array of all different modules categories
else $categ[$specialstring]=1;
@ -531,12 +527,9 @@ if ($mode == 'common')
$objMod = $modules[$modName];
$dirofmodule = $dirmod[$key];
$special = $objMod->special;
//print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."<br>";
//print $objMod->name." - ".$key." - ".$objMod->version."<br>";
//if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev')
if (($special >= 4 && $mode != 'expdev')
|| ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental')) continue; // Discard if not for current tab
if ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental') continue; // Discard if not for current tab
if (! $objMod->getName())
{

View File

@ -316,9 +316,10 @@ class Contrat extends CommonObject
*
* @param User $user Object User making action
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @param string $comment Comment
* @return int <0 if KO, >0 if OK
*/
function closeAll(User $user, $notrigger=0)
function closeAll(User $user, $notrigger=0, $comment='')
{
$this->db->begin();
@ -337,7 +338,7 @@ class Contrat extends CommonObject
$contratline->date_cloture=$now;
$contratline->fk_user_cloture=$user->id;
$contratline->statut='5';
$result=$contratline->close_line($user, $now);
$result=$contratline->close_line($user, $now, $comment, $notrigger);
if ($result < 0)
{
$error++;
@ -3140,9 +3141,10 @@ class ContratLigne extends CommonObjectLine
* @param User $user Objet User who close contract
* @param int $date_end Date end
* @param string $comment A comment typed by user
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @return int <0 if KO, >0 if OK
*/
function close_line($user, $date_end, $comment = '')
function close_line($user, $date_end, $comment = '', $notrigger=0)
{
global $langs, $conf;
@ -3164,15 +3166,19 @@ class ContratLigne extends CommonObjectLine
$sql .= " WHERE rowid = " . $this->id . " AND statut = 4";
$resql = $this->db->query($sql);
if ($resql) {
// Call trigger
$result = $this->call_trigger('LINECONTRACT_CLOSE', $user);
if ($result < 0) {
$error++;
$this->db->rollback();
return -1;
if ($resql)
{
if (! $notrigger)
{
// Call trigger
$result = $this->call_trigger('LINECONTRACT_CLOSE', $user);
if ($result < 0) {
$error++;
$this->db->rollback();
return -1;
}
// End call triggers
}
// End call triggers
$this->db->commit();
return 1;

View File

@ -1290,8 +1290,6 @@ function complete_elementList_with_modules(&$elementList)
$filename[$i]= $modName;
$orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module
//print "x".$modName." ".$orders[$i]."\n<br>";
if (isset($categ[$objMod->special])) $categ[$objMod->special]++; // Array of all different modules categories
else $categ[$objMod->special]=1;
$dirmod[$i] = $dirroot;
if (! empty($objMod->module_parts['contactelement']))
{

View File

@ -54,7 +54,6 @@ class modAccounting extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
$this->special = 0;
$this->picto = 'accounting';
// Data directories to create when module is enabled

View File

@ -56,7 +56,6 @@ class modAdherent extends DolibarrModules
// 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='user';
// Data directories to create when module is enabled

View File

@ -59,7 +59,6 @@ class modAgenda extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='action';
// Data directories to create when module is enabled

View File

@ -51,7 +51,7 @@ class modApi extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
@ -60,8 +60,6 @@ class modApi extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -58,7 +58,6 @@ class modBanque extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='account';
// Data directories to create when module is enabled
@ -138,8 +137,8 @@ class modBanque extends DolibarrModules
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;

View File

@ -51,7 +51,6 @@ class modBarcode extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2;
$this->picto='barcode';
// Data directories to create when module is enabled

View File

@ -55,8 +55,6 @@ class modBlockedLog extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 2;
// Name of image file used for this module.
$this->picto='technic';

View File

@ -52,7 +52,6 @@ class modBookmark extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2;
$this->picto='bookmark';
// Data directories to create when module is enabled
@ -98,10 +97,10 @@ class modBookmark extends DolibarrModules
$this->rights[$r][3] = 0; // La permission est-elle une permission par d<>faut
$this->rights[$r][4] = 'supprimer';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
}
}

View File

@ -55,7 +55,6 @@ class modCashDesk extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto = 'list';
// Data directories to create when module is enabled

View File

@ -54,7 +54,6 @@ class modCategorie extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto = 'category';
// Data directories to create when module is enabled
@ -107,12 +106,12 @@ class modCategorie extends DolibarrModules
$this->rights[$r][4] = 'supprimer';
$r++;
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;
@ -308,7 +307,7 @@ class modCategorie extends DolibarrModules
's.url'=>"company",
's.email'=>"company"
); // We define here only fields that use another picto
// Add extra fields
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople'";
$resql=$this->db->query($sql);
@ -346,7 +345,7 @@ class modCategorie extends DolibarrModules
}
}
// End add axtra fields
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'categorie as u, '.MAIN_DB_PREFIX . 'categorie_contact as cp, '.MAIN_DB_PREFIX . 'socpeople as p';
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'c_country as country ON p.fk_pays = country.rowid';

View File

@ -43,7 +43,7 @@ class modClickToDial extends DolibarrModules
$this->db = $db;
$this->numero = 58;
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Gestion du Click To Dial";
@ -51,7 +51,6 @@ class modClickToDial extends DolibarrModules
$this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1;
$this->picto='phoning';
// Data directories to create when module is enabled

View File

@ -54,8 +54,6 @@ class modCollab extends DolibarrModules
$this->version = 'development';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
$this->picto='globe';

View File

@ -59,7 +59,6 @@ class modCommande extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='order';
// Data directories to create when module is enabled
@ -104,7 +103,7 @@ class modCommande extends DolibarrModules
$this->const[$r][2] = "__(Draft)__";
$this->const[$r][3] = 'Watermark to show on draft orders';
$this->const[$r][4] = 0;*/
// Boxes
$this->boxes = array(
0=>array('file'=>'box_commandes.php','enabledbydefaulton'=>'Home'),
@ -177,12 +176,12 @@ class modCommande extends DolibarrModules
$this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'export';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;

View File

@ -57,7 +57,6 @@ class modComptabilite extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='accounting';
// Config pages
@ -94,12 +93,12 @@ class modComptabilite extends DolibarrModules
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'resultat';
$this->rights[$r][5] = 'lire';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
}

View File

@ -55,7 +55,6 @@ class modContrat extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='contract';
// Data directories to create when module is enabled
@ -71,28 +70,28 @@ class modContrat extends DolibarrModules
// Constants
$this->const = array();
$r=0;
$this->const[$r][0] = "CONTRACT_ADDON";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "mod_contract_serpis";
$this->const[$r][3] = 'Nom du gestionnaire de numerotation des contrats';
$this->const[$r][4] = 0;
$r++;
$this->const[$r][0] = "CONTRACT_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "strato";
$this->const[$r][3] = 'Name of PDF model of contract';
$this->const[$r][4] = 0;
$r++;
$this->const[$r][0] = "CONTRACT_ADDON_PDF_ODT_PATH";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/contracts";
$this->const[$r][3] = "";
$this->const[$r][4] = 0;
$r++;
// Boxes
$this->boxes = array(
0=>array('file'=>'box_contracts.php','enabledbydefaulton'=>'Home'),
@ -103,7 +102,7 @@ class modContrat extends DolibarrModules
$this->rights = array();
$this->rights_class = 'contrat';
$r=0;
$r++;
$this->rights[$r][0] = 161;
$this->rights[$r][1] = 'Lire les contrats';
@ -146,12 +145,12 @@ class modContrat extends DolibarrModules
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'export';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$langs->load("contracts");
@ -223,7 +222,7 @@ class modContrat extends DolibarrModules
$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/contracts/template_contract.odt';
$dirodt=DOL_DATA_ROOT.'/doctemplates/contracts';
$dest=$dirodt.'/template_contract.odt';
if (file_exists($src) && ! file_exists($dest))
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@ -236,12 +235,12 @@ class modContrat extends DolibarrModules
return 0;
}
}
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[1][2])."' AND type = 'contract' AND entity = ".$conf->entity,
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[1][2])."','contract',".$conf->entity.")"
);
return $this->_init($sql,$options);
}
}

View File

@ -54,8 +54,6 @@ class modCron extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 2;
// Name of image file used for this module.
$this->picto = 'technic';

View File

@ -54,7 +54,6 @@ class modDeplacement extends DolibarrModules
$this->version = 'dolibarr_deprecated';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto = "trip";
// Data directories to create when module is enabled
@ -108,12 +107,12 @@ class modDeplacement extends DolibarrModules
$this->rights[5][3] = 0;
$this->rights[5][4] = 'export';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
$r=0;
@ -134,12 +133,12 @@ class modDeplacement extends DolibarrModules
$this->export_sql_end[$r] .=' WHERE d.fk_user = u.rowid';
$this->export_sql_end[$r] .=' AND d.entity IN ('.getEntity('deplacement').')';
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND (sc.fk_user = '.(empty($user)?0:$user->id).' OR d.fk_soc IS NULL)';
if (! empty($user)) // Not defined during migration process
{
$childids = $user->getAllChildIds();
$childids[]=$user->id;
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
}
}

View File

@ -53,7 +53,6 @@ class modDocumentGeneration extends DolibarrModules
$this->version = 'development';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='email';
// Data directories to create when module is enabled

View File

@ -52,7 +52,6 @@ class modDon extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
// Name of png file (without png) used for this module.
// Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
$this->picto='bill';

View File

@ -49,8 +49,6 @@ class modDynamicPrices extends DolibarrModules
$this->version = 'experimental';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
$this->picto='technic';

View File

@ -57,8 +57,6 @@ class modECM extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 0;
// Name of png file (without png) used for this module
$this->picto='dir';

View File

@ -58,7 +58,6 @@ class modExpedition extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto = "sending";
// Data directories to create when module is enabled
@ -222,8 +221,8 @@ class modExpedition extends DolibarrModules
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;

View File

@ -51,7 +51,6 @@ class modExpenseReport extends DolibarrModules
$this->description = "Manage and claim expense reports (transportation, meal, ...)";
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='trip';
// Data directories to create when module is enabled.

View File

@ -51,7 +51,6 @@ class modExport extends DolibarrModules
// 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 = 'technic';
// Data directories to create when module is enabled

View File

@ -52,7 +52,6 @@ class modExternalRss extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1;
$this->picto='rss';
// Data directories to create when module is enabled

View File

@ -49,7 +49,7 @@ class modExternalSite extends DolibarrModules
// Family can be 'crm','financial','hr','projects','product','technic','other'
// It is used to sort modules in module setup page
$this->family = "other";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description used if translation string 'ModuleXXXDesc' not found (XXX is id value)
@ -58,8 +58,6 @@ class modExternalSite extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 1;
// Name of png file (without png) used for this module
$this->picto='bookmark';
// Call to inside lang's file

View File

@ -48,7 +48,7 @@ class modFTP extends DolibarrModules
// Family can be 'crm','financial','hr','projects','product','ecm','technic','other'
// It is used to sort modules in module setup page
$this->family = "other";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description used if translation string 'ModuleXXXDesc' not found (XXX is id value)
@ -57,8 +57,6 @@ class modFTP extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of png file (without png) used for this module
$this->picto='dir';
@ -110,7 +108,7 @@ class modFTP extends DolibarrModules
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'write';
// Menus
//-------
$this->menu[$r]=array('fk_menu'=>0,

View File

@ -57,7 +57,6 @@ class modFacture extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto = 'bill';
// Data directories to create when module is enabled

View File

@ -52,7 +52,6 @@ class modFckeditor extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2;
// Name of png file (without png) used for this module.
// Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
$this->picto='list';

View File

@ -58,7 +58,6 @@ class modFicheinter extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto = "intervention";
// Data directories to create when module is enabled
@ -147,12 +146,12 @@ class modFicheinter extends DolibarrModules
$this->rights[$r][4] = 'ficheinter_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
$this->rights[$r][5] = 'unvalidate';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
//Exports
//--------
$r=1;

View File

@ -59,7 +59,6 @@ class modFournisseur extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='company';
// Data directories to create when module is enabled

View File

@ -44,7 +44,7 @@ class modGeoIPMaxmind extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
@ -53,8 +53,6 @@ class modGeoIPMaxmind extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'

View File

@ -48,7 +48,7 @@ class modGravatar extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i', '', get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
@ -57,8 +57,6 @@ class modGravatar extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'

View File

@ -31,41 +31,40 @@ class modHRM extends DolibarrModules
* Constructor.
* Define names, constants, directories, boxes, permissions
*
* @param DoliDB $db
* @param DoliDB $db
*/
public function __construct($db)
{
global $langs, $conf;
$this->db = $db;
$this->numero = 4000;
$this->rights_class = 'hrm';
$this->family = "hr";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace( '/^mod/i', '', get_class($this));
$this->description = "Management of employees carrier and feelings (department, employment contract)";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'development';
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
$this->special = 0;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
$this->picto='generic';
// define triggers
$this->module_parts = array();
// Data directories to create when module is enabled
$this->dirs = array();
// Config pages
$this->config_page_url = array('admin_hrm.php@hrm');
// Dependencies
$this->depends = array();
$this->requiredby = array(/*"
@ -76,14 +75,14 @@ class modHRM extends DolibarrModules
$this->conflictwith = array();
$this->phpmin = array (
5,
3
3
); // Minimum version of PHP required by module
$this->need_dolibarr_version = array (
3,
9
9
); // Minimum version of Dolibarr required by module
$this->langfiles = array (
"hrm"
"hrm"
);
// Dictionnaries
@ -95,7 +94,7 @@ class modHRM extends DolibarrModules
// Boxes
$this->boxes = array ();
// Permissions
$this->rights = array(); // Permission array used by this module
$r = 0;
@ -106,21 +105,21 @@ class modHRM extends DolibarrModules
$this->rights[$r][4] = 'employee';
$this->rights[$r][5] = 'read';
$r ++;
$this->rights[$r][0] = 4002;
$this->rights[$r][1] = 'Create employees';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'employee';
$this->rights[$r][5] = 'write';
$r ++;
$this->rights[$r][0] = 4003;
$this->rights[$r][1] = 'Delete employees';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'employee';
$this->rights[$r][5] = 'delete';
$r ++;
$this->rights[$r][0] = 4004;
$this->rights[$r][1] = 'Export employees';
$this->rights[$r][3] = 0;
@ -128,13 +127,13 @@ class modHRM extends DolibarrModules
$this->rights[$r][5] = 'export';
$r ++;
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
}
/**
* Function called when module is enabled.
* The init function add constants, boxes, permissions and menus

View File

@ -62,8 +62,6 @@ class modHoliday extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -51,7 +51,6 @@ class modImport extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto = 'technic';
// Data directories to create when module is enabled

View File

@ -57,8 +57,6 @@ class modIncoterm extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
$this->picto='generic';
$this->module_parts = array();

View File

@ -51,7 +51,6 @@ class modLabel extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'development';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2;
$this->picto='label';
// Data directories to create when module is enabled

View File

@ -42,15 +42,13 @@ class modLdap extends DolibarrModules
$this->db = $db;
$this->numero = 200;
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Synchronisation Ldap";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'

View File

@ -54,7 +54,6 @@ class modLoan extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='bill';
// Data directories to create when module is enabled
@ -118,7 +117,7 @@ class modLoan extends DolibarrModules
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'delete';
$this->rights[$r][5] = '';
$r++;
$this->rights[$r][0] = 525;
$this->rights[$r][1] = 'Access loan calculator';
@ -135,12 +134,12 @@ class modLoan extends DolibarrModules
$this->rights[$r][4] = 'export';
$this->rights[$r][5] = '';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;

View File

@ -51,7 +51,6 @@ class modMailing extends DolibarrModules
// 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='email';
// Data directories to create when module is enabled

View File

@ -43,7 +43,7 @@ class modMailmanSpip extends DolibarrModules
$this->db = $db;
$this->numero = 105;
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Mailman or Spip interface for member module";
@ -52,7 +52,6 @@ class modMailmanSpip extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1;
$this->picto='technic';
// Data directories to create when module is enabled

View File

@ -57,8 +57,6 @@ class modMargin extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 2;
// Name of png file (without png) used for this module.
// Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
$this->picto='margin';

View File

@ -51,8 +51,6 @@ class modModuleBuilder extends DolibarrModules
$this->version = 'experimental';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
$this->picto='technic';

View File

@ -65,8 +65,6 @@ class modMultiCurrency extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -41,7 +41,7 @@ class modNotification extends DolibarrModules
$this->db = $db;
$this->numero = 600;
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "EMail notifications (push) on business Dolibarr events";
@ -49,7 +49,6 @@ class modNotification extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1;
$this->picto='email';
// Data directories to create when module is enabled.

View File

@ -46,7 +46,7 @@ class modOauth extends DolibarrModules
$this->numero = 66000;
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "technic";
$this->family = "interface";
$this->module_position = 510;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
@ -55,8 +55,6 @@ class modOauth extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -61,8 +61,6 @@ class modOpenSurvey extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -48,7 +48,7 @@ class modPayBox extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "other";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
@ -57,8 +57,6 @@ class modPayBox extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory, use this->picto=DOL_URL_ROOT.'/module/img/file.png'

View File

@ -49,7 +49,7 @@ class modPaypal extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "other";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
@ -58,8 +58,6 @@ class modPaypal extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory, use this->picto=DOL_URL_ROOT.'/module/img/file.png'

View File

@ -57,7 +57,6 @@ class modPrelevement extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
// Name of png file (without png) used for this module
$this->picto='payment';
@ -74,15 +73,15 @@ class modPrelevement extends DolibarrModules
// Constants
$this->const = array();
$r=0;
$this->const[$r][0] = "BANK_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "sepamandate";
$this->const[$r][3] = 'Name of manager to generate SEPA mandate';
$this->const[$r][4] = 0;
$r++;
// Boxes
$this->boxes = array();
@ -129,11 +128,11 @@ class modPrelevement extends DolibarrModules
$this->rights[2][4] = 'bons';
$this->rights[2][5] = 'configurer';
*/
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
}
@ -155,7 +154,7 @@ class modPrelevement extends DolibarrModules
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type = 'bankaccount' AND entity = ".$conf->entity,
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2])."','bankaccount',".$conf->entity.")",
);
);
return $this->_init($sql,$options);
}

View File

@ -46,7 +46,7 @@ class modPrinting extends DolibarrModules
$this->numero = 64000;
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "technic";
$this->family = "interface";
$this->module_position = 520;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
@ -54,8 +54,6 @@ class modPrinting extends DolibarrModules
$this->description = "Enable Direct Printing System.";
$this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -59,7 +59,6 @@ class modProduct extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='product';
// Data directories to create when module is enabled

View File

@ -47,7 +47,7 @@ class modProductBatch extends DolibarrModules
$this->family = "products";
$this->module_position = 45;
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Batch number, eat-by and sell-by date management module";
@ -56,7 +56,6 @@ class modProductBatch extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where dluo is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='stock';
@ -95,12 +94,12 @@ class modProductBatch extends DolibarrModules
$this->rights = array(); // Permission array used by this module
$r=0;
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
$r=0;

View File

@ -58,7 +58,6 @@ class modProjet extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->config_page_url = array("project.php@projet");
$this->picto='project';

View File

@ -58,7 +58,6 @@ class modPropale extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='propal';
// Data directories to create when module is enabled
@ -101,13 +100,13 @@ class modPropale extends DolibarrModules
$this->const[$r][3] = "";
$this->const[$r][4] = 0;
$r++;
/*$this->const[$r][0] = "PROPALE_DRAFT_WATERMARK";
$this->const[$r][2] = "__(Draft)__";
$this->const[$r][3] = 'Watermark to show on draft proposals';
$this->const[$r][4] = 0;
$r++;*/
// Boxes
$this->boxes = array(
0=>array('file'=>'box_graph_propales_permonth.php','enabledbydefaulton'=>'Home'),
@ -170,12 +169,12 @@ class modPropale extends DolibarrModules
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
$this->rights[$r][4] = 'export';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;

View File

@ -46,7 +46,7 @@ class modReceiptPrinter extends DolibarrModules
$this->numero = 67000;
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "technic";
$this->family = "interface";
$this->module_position = 530;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
@ -55,8 +55,6 @@ class modReceiptPrinter extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
$this->version = 'development';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -69,9 +69,6 @@ class modResource extends DolibarrModules
// Key used in llx_const table to save module status enabled/disabled
// (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
// Where to store the module in setup page
// (0=common,1=interface,2=others,3=very specific)
$this->special = 2;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png
// use this->picto='pictovalue'

View File

@ -60,7 +60,6 @@ class modSalaries extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='bill';
// Data directories to create when module is enabled

View File

@ -57,7 +57,6 @@ class modService extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='service';
// Data directories to create when module is enabled

View File

@ -44,7 +44,7 @@ class modSkype extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "crm";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Enable Skype links into contacts";
@ -52,8 +52,6 @@ class modSkype extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
$this->picto='skype';

View File

@ -58,7 +58,6 @@ class modSociete extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->config_page_url = array("societe.php@societe");
// Name of image file used for this module.
$this->picto='company';

View File

@ -57,7 +57,6 @@ class modStock extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='stock';
// Data directories to create when module is enabled

View File

@ -48,7 +48,7 @@ class modStripe extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "other";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
@ -57,8 +57,6 @@ class modStripe extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 1;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory, use this->picto=DOL_URL_ROOT.'/module/img/file.png'

View File

@ -56,7 +56,6 @@ class modSupplierProposal extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='supplier_proposal';
$this->dirs = array();
@ -177,7 +176,7 @@ class modSupplierProposal extends DolibarrModules
'position'=>302
);
$r++;
$this->menu[$r]=array(
'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=supplier_proposalsubmenu',
'type'=>'left',
@ -233,8 +232,8 @@ class modSupplierProposal extends DolibarrModules
return $this->_init($sql, $options);
}
/**
* Function called when module is disabled.
@ -249,8 +248,8 @@ class modSupplierProposal extends DolibarrModules
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'askpricesupplier'"
);
return $this->_remove($sql, $options);
}
}
}

View File

@ -57,8 +57,6 @@ class modSyslog extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 2;
// Name of image file used for this module.
$this->picto='technic';

View File

@ -58,7 +58,6 @@ class modTax extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='bill';
// Data directories to create when module is enabled
@ -119,10 +118,10 @@ class modTax extends DolibarrModules
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;
@ -140,7 +139,7 @@ class modTax extends DolibarrModules
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementcharge as p ON p.fk_charge = c.rowid';
$this->export_sql_end[$r] .=' WHERE c.fk_type = cc.id';
$this->export_sql_end[$r] .=' AND c.entity IN ('.getEntity('tax').')';
// Import social contributions
$r++;
$this->import_code[$r]=$this->rights_class.'_'.$r;
@ -151,14 +150,14 @@ class modTax extends DolibarrModules
$this->import_fields_array[$r]=array('t.libelle'=>"Label*",'t.fk_type'=>"Type",
't.amount'=>"Amount*",'t.date_ech'=>"DateDue*",'t.periode'=>"PeriodEndDate*"
);
$this->import_convertvalue_array[$r]=array(
't.fk_type'=>array('rule'=>'fetchidfromref','classfile'=>'/compta/sociales/class/cchargesociales.class.php','class'=>'Cchargesociales','method'=>'fetch','element'=>'Cchargesociales')
);
$this->import_examplevalues_array[$r]=array('t.libelle'=>"Social/fiscal contribution",'t.fk_type'=>"TAXPRO (must be id or code found into dictionary)",
't.date_ech'=>"2016-01-01", 't.periode'=>"2016-01-01"
);
// Import Taxes
$r++;
$this->import_code[$r]=$this->rights_class.'_'.$r;
@ -169,14 +168,14 @@ class modTax extends DolibarrModules
$this->import_fields_array[$r]=array('t.datep'=>"DatePayment*",'t.datev'=>"DateValue*",'t.label'=>"Label*",'t.fk_typepayment'=>"PaymentMode*",
't.amount'=>"Amount*",'t.num_payment'=>'Numero'
);
$this->import_convertvalue_array[$r]=array(
't.fk_typepayment'=>array('rule'=>'fetchidfromref','classfile'=>'/compta/paiement/class/cpaiement.class.php','class'=>'Cpaiement','method'=>'fetch','element'=>'Cpaiement')
);
$this->import_examplevalues_array[$r]=array('t.label'=>"VAT Payment 1st quarter 2016",'t.fk_typepayment'=>"CHQ (must be id or code found into dictionary)",
't.datep'=>"2016-04-02", 't.datev'=>"2016-03-31", 't.amount'=>1000, 't.num_payment'=>'123456'
);
}

View File

@ -55,7 +55,6 @@ class modUser extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='group';
// Data directories to create when module is enabled

View File

@ -62,8 +62,6 @@ class modVariants extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -40,7 +40,7 @@ class modWebServices extends DolibarrModules
$this->db = $db;
$this->numero = 2600;
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Enable the Dolibarr web services server";
@ -48,8 +48,6 @@ class modWebServices extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
$this->picto='technic';

View File

@ -40,7 +40,7 @@ class modWebServicesClient extends DolibarrModules
$this->db = $db;
$this->numero = 2660;
$this->family = "technic";
$this->family = "interface";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Enable the web service client to call external supplier web services";
@ -48,8 +48,6 @@ class modWebServicesClient extends DolibarrModules
$this->version = 'experimental';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of image file used for this module.
$this->picto='technic';

View File

@ -54,8 +54,6 @@ class modWebsite extends DolibarrModules
$this->version = 'experimental';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
$this->picto='globe';

View File

@ -56,8 +56,6 @@ class modWorkflow extends DolibarrModules
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 2;
// Name of png file (without png) used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'

View File

@ -53,7 +53,7 @@ class modMyModule extends DolibarrModules
// Key text used to identify module (for permissions, menus, etc...)
$this->rights_class = 'mymodule';
// Family can be 'crm','financial','hr','projects','products','ecm','technic','interface','other'
// Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...'
// It is used to group modules by family in module setup page
$this->family = "other";
// Module position in the family on 2 digits ('01', '10', '20', ...)

View File

@ -178,8 +178,6 @@ foreach ($modulesdir as $dir)
$filename[$i]= $modName;
$orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module
//print "x".$modName." ".$orders[$i]."\n<br>";
if (isset($categ[$objMod->special])) $categ[$objMod->special]++; // Array of all different modules categories
else $categ[$objMod->special]=1;
$dirmod[$i] = $dirroot;
$j++;
$i++;