Fix: Error management in module activation

This commit is contained in:
Laurent Destailleur 2008-10-06 07:39:52 +00:00
parent 54a0b4fbde
commit 762140e975
51 changed files with 582 additions and 566 deletions

View File

@ -136,12 +136,25 @@ function UnActivate($value,$requiredby=1)
if ($modName) if ($modName)
{ {
$file = $modName . ".class.php"; $file = $modName . ".class.php";
$res=include_once(DOL_DOCUMENT_ROOT."/includes/modules/".$file); $res=@include_once(DOL_DOCUMENT_ROOT."/includes/modules/".$file);
if (defined('DOL_DOCUMENT_ROOT_BIS') && ! $res) include_once(DOL_DOCUMENT_ROOT_BIS."/includes/modules/".$file); if (defined('DOL_DOCUMENT_ROOT_BIS') && ! $res) include_once(DOL_DOCUMENT_ROOT_BIS."/includes/modules/".$file);
if ($res)
{
$objMod = new $modName($db); $objMod = new $modName($db);
$result=$objMod->remove(); $result=$objMod->remove();
} }
else
{
$genericMod = new DolibarrModules($db);
$genericMod->name=eregi_replace('^mod','',$modName);
$genericMod->style_sheet=1;
$genericMod->rights_class=strtolower(eregi_replace('^mod','',$modName));
$genericMod->const_name='MAIN_MODULE_'.strtoupper(eregi_replace('^mod','',$modName));
dolibarr_syslog("modules::UnActivate Failed to find module file, we use generic function with name ".$genericMod->name);
$genericMod->_remove();
}
}
// Desactivation des modules qui dependent de lui // Desactivation des modules qui dependent de lui
if ($requiredby) if ($requiredby)

View File

@ -24,13 +24,13 @@
\file htdocs/includes/modules/DolibarrModules.class.php \file htdocs/includes/modules/DolibarrModules.class.php
\brief Fichier de description et activation des modules Dolibarr \brief Fichier de description et activation des modules Dolibarr
\version $Id$ \version $Id$
*/ */
/** /**
\class DolibarrModules \class DolibarrModules
\brief Classe mere des classes de description et activation des modules Dolibarr \brief Classe mere des classes de description et activation des modules Dolibarr
*/ */
class DolibarrModules class DolibarrModules
{ {
//! Database handler //! Database handler
@ -76,10 +76,10 @@ class DolibarrModules
$this->db->begin(); $this->db->begin();
// Insere une entree dans llx_dolibarr_modules // Insert line in module table
if (! $err) $err+=$this->_dbactive(); if (! $err) $err+=$this->_dbactive();
// Insere la constante d'activation module // Insert activation module constant
if (! $err) $err+=$this->_active(); if (! $err) $err+=$this->_active();
// Insere le nom de la feuille de style // Insere le nom de la feuille de style
@ -173,10 +173,10 @@ class DolibarrModules
{ {
$err = 0; $err = 0;
// Supprime entree des modules // Remove line in activation module
$err+=$this->_dbunactive(); $err+=$this->_dbunactive();
// Supprime la constante d'activation du module // Remove activation module line
$err+=$this->_unactive(); $err+=$this->_unactive();
// Supprime les boites de la liste des boites disponibles // Supprime les boites de la liste des boites disponibles
@ -343,8 +343,8 @@ class DolibarrModules
/** /**
\brief Insere ligne module * \brief Insert line in module table
\return int Nombre d'erreurs (0 si ok) * \return int Nombre d'erreurs (0 si ok)
*/ */
function _dbactive() function _dbactive()
{ {
@ -364,14 +364,14 @@ class DolibarrModules
/** /**
\brief Supprime ligne module * \brief Remove line in module table
\return int Nombre d'erreurs (0 si ok) * \return int Nb of errors (0 if OK)
*/ */
function _dbunactive() function _dbunactive()
{ {
$err = 0; $err = 0;
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."dolibarr_modules WHERE numero=".$this->numero.";"; $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."dolibarr_modules WHERE numero=".$this->numero;
$this->db->query($sql_del); $this->db->query($sql_del);
return $err; return $err;
@ -379,18 +379,19 @@ class DolibarrModules
/** /**
\brief Insere constante d'activation module * \brief Insert constant to activate module
\return int Nombre d'erreurs (0 si ok) * \return int Nb of errors (0 if OK)
*/ */
function _active() function _active()
{ {
$err = 0; $err = 0;
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."';"; $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."'";
$this->db->query($sql_del); $this->db->query($sql_del);
$sql ="INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES $sql ="INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES
('".$this->const_name."','1',0);"; ('".$this->const_name."','1',0)";
dolibarr_syslog("DolibarrModules::_active sql=".$sql);
if (!$this->db->query($sql)) if (!$this->db->query($sql))
{ {
$err++; $err++;
@ -401,14 +402,15 @@ class DolibarrModules
/** /**
\brief Supprime constante d'activation module * \brief Remove activation line
\return int Nombre d'erreurs (0 si ok) * \return int Nb of errors (0 if OK)
*/ **/
function _unactive() function _unactive()
{ {
$err = 0; $err = 0;
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."';"; $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."'";
dolibarr_syslog("DolibarrModules::_unactive sql=".$sql_del);
$this->db->query($sql_del); $this->db->query($sql_del);
return $err; return $err;
@ -480,10 +482,11 @@ class DolibarrModules
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_generator "; $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_generator ";
$sql .= "WHERE name= '".addslashes($doc[0])."' AND classfile='".$doc[1]."'AND class='".$doc[2]."';"; $sql .= "WHERE name= '".addslashes($doc[0])."' AND classfile='".$doc[1]."'AND class='".$doc[2]."';";
dolibarr_syslog("DolibarrModules::delete_docs sql=".$sql);
$result=$this->db->query($sql); $result=$this->db->query($sql);
if (! $result) if (! $result)
{ {
dolibarr_syslog("DolibarrModules.class::delete_docs Error sql=".$sql." - ".$this->db->error()); dolibarr_syslog("DolibarrModules::delete_docs Error sql=".$sql." - ".$this->db->error());
$err++; $err++;
} }

View File

@ -56,7 +56,7 @@ class modAdherent extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion des adherents d'une association"; $this->description = "Gestion des adherents d'une association";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_ADHERENT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='user'; $this->picto='user';

View File

@ -57,7 +57,7 @@ class modBanque extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_BANQUE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='account'; $this->picto='account';

View File

@ -54,7 +54,7 @@ class modBarcode extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion des codes barres"; $this->description = "Gestion des codes barres";
$this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_BARCODE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
$this->picto='barcode'; $this->picto='barcode';

View File

@ -56,7 +56,7 @@ class modBookmark extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_BOOKMARK'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
$this->picto='bookmark'; $this->picto='bookmark';

View File

@ -55,7 +55,7 @@ class modBoutique extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Interface de visualisation d'une boutique OSCommerce ou OSCSS"; $this->description = "Interface de visualisation d'une boutique OSCommerce ou OSCSS";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_BOUTIQUE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
// Dir // Dir
@ -68,7 +68,7 @@ class modBoutique extends DolibarrModules
// D<>pendances // D<>pendances
$this->depends = array(); $this->depends = array();
$this->requiredby = array(); $this->requiredby = array();
$this->conflictwith = array("modOSCommerce2"); $this->conflictwith = array("modOSCommerceWS");
$this->langfiles = array("shop"); $this->langfiles = array("shop");
// Constantes // Constantes

View File

@ -60,7 +60,7 @@ class modCashDesk extends DolibarrModules
$this->version = 'development'; $this->version = 'development';
//$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version //$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_CASHDESK'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto = 'generic'; $this->picto = 'generic';

View File

@ -56,7 +56,7 @@ class modCategorie extends DolibarrModules
$this->version = $this->revision[1]; $this->version = $this->revision[1];
//$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version //$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_CATEGORIE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto = ''; $this->picto = '';

View File

@ -56,7 +56,7 @@ class modClickToDial extends DolibarrModules
$this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_CLICKTODIAL'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
$this->picto='phoning'; $this->picto='phoning';

View File

@ -56,7 +56,7 @@ class modCommande extends DolibarrModules
$this->description = "Gestion des commandes clients"; $this->description = "Gestion des commandes clients";
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_COMMANDE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='order'; $this->picto='order';

View File

@ -57,7 +57,7 @@ class modCommercial extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_COMMERCIAL'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='commercial'; $this->picto='commercial';

View File

@ -59,7 +59,7 @@ class modComptabilite extends DolibarrModules
$this->revision = explode(" ","$Revision$"); $this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_COMPTABILITE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto=''; $this->picto='';

View File

@ -61,7 +61,7 @@ class modComptabiliteExpert extends DolibarrModules
// $this->version = $this->revision[1]; // $this->version = $this->revision[1];
$this->version = "development"; $this->version = "development";
$this->const_name = 'MAIN_MODULE_COMPTABILITEEXPERT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
// Config pages // Config pages

View File

@ -57,7 +57,7 @@ class modContrat extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_CONTRAT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='contract'; $this->picto='contract';

View File

@ -56,7 +56,7 @@ class modDeplacement extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_DEPLACEMENT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto = "generic"; $this->picto = "generic";

View File

@ -54,7 +54,7 @@ class modDocument extends DolibarrModules
$this->description = "Gestion des documents"; $this->description = "Gestion des documents";
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_DOCUMENT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
$this->picto='dir'; $this->picto='dir';

View File

@ -54,7 +54,7 @@ class modDomain extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion d'une base de noms de domaines"; $this->description = "Gestion d'une base de noms de domaines";
$this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_DOMAIN'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
$this->picto='user'; $this->picto='user';

View File

@ -55,7 +55,7 @@ class modDon extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion des dons"; $this->description = "Gestion des dons";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_DON'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
// Dir // Dir

View File

@ -53,7 +53,7 @@ class modDroitPret extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion du droit de prets"; $this->description = "Gestion du droit de prets";
$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_DROITPRET'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
// Dir // Dir

View File

@ -60,7 +60,7 @@ class modECM extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr'; $this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (XXX is id value) // Key used in llx_const table to save module status enabled/disabled (XXX is id value)
$this->const_name = 'MAIN_MODULE_ECM'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other) // Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 0; $this->special = 0;
// Name of png file (without png) used for this module // Name of png file (without png) used for this module

View File

@ -54,7 +54,7 @@ class modEditeur extends DolibarrModules
$this->description = "Gestion des editeurs"; $this->description = "Gestion des editeurs";
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_EDITEUR'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 3; $this->special = 3;
$this->picto='book'; $this->picto='book';

View File

@ -58,7 +58,7 @@ class modEnergie extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_ENERGIE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
$this->picto='energie'; $this->picto='energie';

View File

@ -55,7 +55,7 @@ class modExpedition extends DolibarrModules
$this->description = "Gestion des expeditions"; $this->description = "Gestion des expeditions";
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_EXPEDITION'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto = "sending"; $this->picto = "sending";

View File

@ -52,7 +52,7 @@ class modExport extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Outils d'exports de donnees Dolibarr (via un assistant)"; $this->description = "Outils d'exports de donnees Dolibarr (via un assistant)";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_EXPORT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto=''; $this->picto='';

View File

@ -55,7 +55,7 @@ class modExternalRss extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Ajout de files d'informations RSS dans les <20>crans Dolibarr"; $this->description = "Ajout de files d'informations RSS dans les <20>crans Dolibarr";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_EXTERNALRSS'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
$this->picto='rss'; $this->picto='rss';

View File

@ -58,7 +58,7 @@ class modFacture extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_FACTURE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='bill'; $this->picto='bill';

View File

@ -53,7 +53,7 @@ class modFckeditor extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Editeur WYSIWYG"; $this->description = "Editeur WYSIWYG";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_FCKEDITOR'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
// Dir // Dir

View File

@ -59,7 +59,7 @@ class modFicheinter extends DolibarrModules
$this->revision = explode(" ","$Revision$"); $this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_FICHEINTER'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto = "intervention"; $this->picto = "intervention";

View File

@ -56,7 +56,7 @@ class modFournisseur extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_FOURNISSEUR'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='company'; $this->picto='company';

View File

@ -53,7 +53,7 @@ class modImport extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Outils d'imports de donnees Dolibarr (via un assistant)"; $this->description = "Outils d'imports de donnees Dolibarr (via un assistant)";
$this->version = 'development'; // 'experimental' or 'dolibarr' or version $this->version = 'development'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_IMPORT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto=''; $this->picto='';

View File

@ -54,7 +54,7 @@ class modLabel extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion des etiquettes"; $this->description = "Gestion des etiquettes";
$this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_LABEL'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
$this->picto='label'; $this->picto='label';

View File

@ -53,7 +53,7 @@ class modLdap extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Synchronisation Ldap"; $this->description = "Synchronisation Ldap";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_LDAP'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
// Dir // Dir

View File

@ -53,7 +53,7 @@ class modMailing extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion des EMailings"; $this->description = "Gestion des EMailings";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_MAILING'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
$this->picto='email'; $this->picto='email';

View File

@ -61,7 +61,7 @@ class modMantis extends DolibarrModules
// Possible values for version are: 'experimental' or 'dolibarr' or version // Possible values for version are: 'experimental' or 'dolibarr' or version
$this->version = 'dolibarr'; $this->version = 'dolibarr';
// Id used in llx_const table to manage module status (enabled/disabled) // Id used in llx_const table to manage module status (enabled/disabled)
$this->const_name = 'MAIN_MODULE_MANTIS'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other) // Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 1; $this->special = 1;
// Name of png file (without png) used for this module // Name of png file (without png) used for this module

View File

@ -55,7 +55,7 @@ class modNotification extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion des notifications (par mail) sur <20>v<EFBFBD>nement Dolibarr"; $this->description = "Gestion des notifications (par mail) sur <20>v<EFBFBD>nement Dolibarr";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_NOTIFICATION'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
$this->picto='email'; $this->picto='email';

View File

@ -39,14 +39,14 @@ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
\brief Classe de description et activation du module OSCommerce2 \brief Classe de description et activation du module OSCommerce2
*/ */
class modOSCommerce2 extends DolibarrModules class modOSCommerceWS extends DolibarrModules
{ {
/** /**
* \brief Constructeur. Definit les noms, constantes et boites * \brief Constructeur. Definit les noms, constantes et boites
* \param DB handler d'acc<EFBFBD>s base * \param DB handler d'acc<EFBFBD>s base
*/ */
function modOSCommerce2($DB) function modOSCommerceWS($DB)
{ {
$this->db = $DB ; $this->db = $DB ;
$this->numero = 900; $this->numero = 900;
@ -56,7 +56,7 @@ class modOSCommerce2 extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Interface de visualisation d'une boutique OSCommerce via des Web services.\nCe module requiert d'installer les composants dans /oscommerce_ws/ws_server sur OSCommerce. Voir fichier README dans /oscommerce_ws/ws_server"; $this->description = "Interface de visualisation d'une boutique OSCommerce via des Web services.\nCe module requiert d'installer les composants dans /oscommerce_ws/ws_server sur OSCommerce. Voir fichier README dans /oscommerce_ws/ws_server";
$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_OSCOMMERCEWS'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
// Dir // Dir
@ -65,7 +65,7 @@ class modOSCommerce2 extends DolibarrModules
// Config pages // Config pages
$this->config_page_url = array(); $this->config_page_url = array();
// D<EFBFBD>pendances // Dependances
$this->depends = array(); $this->depends = array();
$this->requiredby = array(); $this->requiredby = array();
$this->conflictwith = array("modBoutique"); $this->conflictwith = array("modBoutique");

View File

@ -60,7 +60,7 @@ class modPhenix extends DolibarrModules
// Possible values for version are: 'experimental' or 'dolibarr' or version // Possible values for version are: 'experimental' or 'dolibarr' or version
$this->version = 'development'; $this->version = 'development';
// Id used in llx_const table to manage module status (enabled/disabled) // Id used in llx_const table to manage module status (enabled/disabled)
$this->const_name = 'MAIN_MODULE_PHENIX'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other) // Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 1; $this->special = 1;
// Name of png file (without png) used for this module // Name of png file (without png) used for this module

View File

@ -54,7 +54,7 @@ class modPostnuke extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Gestion de l'outil PostNuke"; $this->description = "Gestion de l'outil PostNuke";
$this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_POSTNUKE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 1; $this->special = 1;
// Dir // Dir

View File

@ -58,7 +58,7 @@ class modPrelevement extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_PRELEVEMENT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
// Name of png file (without png) used for this module // Name of png file (without png) used for this module
$this->picto='payment'; $this->picto='payment';

View File

@ -61,7 +61,7 @@ class modProduit extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_PRODUIT'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='product'; $this->picto='product';

View File

@ -56,7 +56,7 @@ class modProjet extends DolibarrModules
$this->description = "Gestion des projets"; $this->description = "Gestion des projets";
$this->revision = explode(" ","$Revision$"); $this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_PROJET'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='email'; $this->picto='email';

View File

@ -58,7 +58,7 @@ class modPropale extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_PROPALE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='propal'; $this->picto='propal';

View File

@ -59,7 +59,7 @@ class modService extends DolibarrModules
$this->revision = explode(" ","$Revision$"); $this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_SERVICE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='service'; $this->picto='service';

View File

@ -60,7 +60,7 @@ class modSociete extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_SOCIETE'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->config_page_url = array("societe.php"); $this->config_page_url = array("societe.php");
$this->picto='company'; $this->picto='company';

View File

@ -57,7 +57,7 @@ class modStock extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_STOCK'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='stock'; $this->picto='stock';

View File

@ -52,7 +52,7 @@ class modSyslog extends DolibarrModules
$this->name = eregi_replace('^mod','',get_class($this)); $this->name = eregi_replace('^mod','',get_class($this));
$this->description = "Activation des traces debug (syslog)"; $this->description = "Activation des traces debug (syslog)";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_SYSLOG'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
//$this->picto='phoning'; //$this->picto='phoning';

View File

@ -60,7 +60,7 @@ class modTax extends DolibarrModules
$this->revision = explode(" ","$Revision$"); $this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_TAX'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='bill'; $this->picto='bill';

View File

@ -59,7 +59,7 @@ class modTelephonie extends DolibarrModules
$this->revision = explode(" ","$Revision$"); $this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = "MAIN_MODULE_TELEPHONIE"; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2; $this->special = 2;
$this->picto='phoning'; $this->picto='phoning';

View File

@ -58,7 +58,7 @@ class modUser extends DolibarrModules
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_USER'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0; $this->special = 0;
$this->picto='group'; $this->picto='group';

View File

@ -61,7 +61,7 @@ class modWebcalendar extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr'; $this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (XXX is id value) // Key used in llx_const table to save module status enabled/disabled (XXX is id value)
$this->const_name = 'MAIN_MODULE_WEBCALENDAR'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=other) // Where to store the module in setup page (0=common,1=interface,2=other)
$this->special = 1; $this->special = 1;
// Name of png file (without png) used for this module // Name of png file (without png) used for this module