forked from Wavyzz/dolibarr
Fix: boxes must not be removed after update
This commit is contained in:
@@ -169,32 +169,35 @@ class modBanque extends DolibarrModules
|
|||||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||||
* It also creates data directories.
|
* It also creates data directories.
|
||||||
*
|
*
|
||||||
* @return int 1 if OK, 0 if KO
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
*/
|
* @return int 1 if OK, 0 if KO
|
||||||
function init()
|
*/
|
||||||
|
function init($options='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
*
|
*
|
||||||
* @return int 1 if OK, 0 if KO
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -99,29 +99,38 @@ class modBarcode extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module.
|
* Function called when module is enabled.
|
||||||
* Definit egalement les repertoires de donnees a creer pour ce module.
|
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||||
|
* It also creates data directories.
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init()
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -103,27 +103,35 @@ class modBookmark extends DolibarrModules
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appel<EFBFBD>e lors de l'activation du module. Ins<6E>re en base les constantes, boites, permissions du module.
|
* Function called when module is enabled.
|
||||||
* D<>finit <EFBFBD>galement les r<>pertoires de donn<6E>es <20> cr<63>er pour ce module.
|
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||||
|
* It also creates data directories.
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init()
|
function init($options='')
|
||||||
{
|
|
||||||
|
|
||||||
$sql = array();
|
|
||||||
|
|
||||||
return $this->_init($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Fonction appel<65>e lors de la d<>sactivation d'un module.
|
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
|
||||||
*/
|
|
||||||
function remove()
|
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function called when module is disabled.
|
||||||
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
|
* Data directories are not deleted
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
|
$sql = array();
|
||||||
|
|
||||||
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -86,27 +86,35 @@ class modBoutique extends DolibarrModules
|
|||||||
$this->rights_class = 'boutique';
|
$this->rights_class = 'boutique';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module.
|
* Function called when module is enabled.
|
||||||
* Definit egalement les repertoires de donnees a creer pour ce module.
|
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||||
*/
|
* It also creates data directories.
|
||||||
function init()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
$sql = array();
|
* @return int 1 if OK, 0 if KO
|
||||||
|
|
||||||
return $this->_init($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
|
||||||
*/
|
*/
|
||||||
function remove()
|
function init($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function called when module is disabled.
|
||||||
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
|
* Data directories are not deleted
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
|
$sql = array();
|
||||||
|
|
||||||
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class modCategorie extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
@@ -178,17 +178,19 @@ class modCategorie extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
* @return int 1 if OK, 0 if KO
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -95,16 +95,19 @@ class modClickToDial extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
* \return int 1 if OK, 0 if KO
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ class modCommande extends DolibarrModules
|
|||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
//ODT template
|
//ODT template
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||||
@@ -222,20 +222,20 @@ class modCommande extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted
|
* Data directories are not deleted
|
||||||
*
|
*
|
||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -134,23 +134,27 @@ class modComptabilite extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Nettoyage avant activation
|
// Nettoyage avant activation
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -131,23 +131,27 @@ class modContrat extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Nettoyage avant activation
|
// Nettoyage avant activation
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -144,23 +144,27 @@ class modDeplacement extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class modDocument extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
@@ -118,15 +118,20 @@ class modDocument extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -125,15 +125,20 @@ class modDon extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -200,17 +200,20 @@ class modECM extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
*/
|
*
|
||||||
function remove()
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
{
|
* @return int 1 if OK, 0 if KO
|
||||||
$sql = array();
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ class modExpedition extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
@@ -218,15 +218,20 @@ class modExpedition extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -106,15 +106,20 @@ class modExport extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -119,18 +119,23 @@ class modExternalRss extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
// Supprime anciennes delcarations de la boite RSS
|
// Delete old declarations of RSS box
|
||||||
$this->boxes[0][1] = "box_external_rss.php";
|
$this->boxes[0][1] = "box_external_rss.php";
|
||||||
|
|
||||||
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->_remove($sql);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -129,17 +129,20 @@ class modExternalSite extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
*/
|
*
|
||||||
function remove()
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
{
|
* @return int 1 if OK, 0 if KO
|
||||||
$sql = array();
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,17 +142,20 @@ class modFTP extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
*/
|
*
|
||||||
function remove()
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
{
|
* @return int 1 if OK, 0 if KO
|
||||||
$sql = array();
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -237,16 +237,20 @@ class modFacture extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* @param options Options when disabling module
|
* Data directories are not deleted
|
||||||
*/
|
*
|
||||||
function remove($options='')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
{
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql,$options);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -97,15 +97,20 @@ class modFckeditor extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class modFicheinter extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array(
|
$sql = array(
|
||||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||||
@@ -175,14 +175,19 @@ class modFicheinter extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
|
* Data directories are not deleted
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class modFournisseur extends DolibarrModules
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array(
|
$sql = array(
|
||||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||||
@@ -280,16 +280,20 @@ class modFournisseur extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -101,15 +101,20 @@ class modGeoIPMaxmind extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -197,26 +197,29 @@ class modGravatar extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
* \return int 1 if OK, 0 if KO
|
*
|
||||||
*/
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
function remove()
|
* @return int 1 if OK, 0 if KO
|
||||||
{
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Create tables, keys and data required by module
|
* Create tables, keys and data required by module
|
||||||
* Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
|
* Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
|
||||||
* and create data commands must be stored in directory /mymodule/sql/
|
* and create data commands must be stored in directory /mymodule/sql/
|
||||||
* This function is called by this->init.
|
* This function is called by this->init.
|
||||||
* \return int <=0 if KO, >0 if OK
|
*
|
||||||
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function load_tables()
|
function load_tables()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -101,15 +101,20 @@ class modImport extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -103,22 +103,27 @@ class modLabel extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -107,15 +107,20 @@ class modLdap extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -113,22 +113,27 @@ class modMailing extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -95,16 +95,19 @@ class modMailmanSpip extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
* \return int 1 if OK, 0 if KO
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -86,22 +86,27 @@ class modNotification extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -194,25 +194,27 @@ class modPayBox extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
* \return int 1 if OK, 0 if KO
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Create tables and keys required by module
|
* Create tables and keys required by module
|
||||||
* Files mymodule.sql and mymodule.key.sql with create table and create keys
|
* Files mymodule.sql and mymodule.key.sql with create table and create keys
|
||||||
* commands must be stored in directory /mymodule/sql/
|
* commands must be stored in directory /mymodule/sql/
|
||||||
* This function is called by this->init.
|
* This function is called by this->init.
|
||||||
* \return int <=0 if KO, >0 if OK
|
*
|
||||||
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function load_tables()
|
function load_tables()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -186,25 +186,28 @@ class modPaypal extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
* \return int 1 if OK, 0 if KO
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Create tables and keys required by module
|
* Create tables and keys required by module
|
||||||
* Files mymodule.sql and mymodule.key.sql with create table and create keys
|
* Files mymodule.sql and mymodule.key.sql with create table and create keys
|
||||||
* commands must be stored in directory /mymodule/sql/
|
* commands must be stored in directory /mymodule/sql/
|
||||||
* This function is called by this->init.
|
* This function is called by this->init.
|
||||||
* \return int <=0 if KO, >0 if OK
|
*
|
||||||
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function load_tables()
|
function load_tables()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -136,23 +136,27 @@ class modPrelevement extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -202,22 +202,27 @@ class modProduct extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class modProjet extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array(
|
$sql = array(
|
||||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||||
@@ -162,15 +162,20 @@ class modProjet extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ class modPropale extends DolibarrModules
|
|||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
// Remove permissions and default values
|
// Remove permissions and default values
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
//ODT template
|
//ODT template
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||||
@@ -217,16 +217,20 @@ class modPropale extends DolibarrModules
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -188,22 +188,27 @@ class modService extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions et valeurs par defaut
|
// Permissions et valeurs par defaut
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -345,16 +345,19 @@ class modSociete extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
* @return int 1 if OK, 0 if KO
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove($options='')
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql,$options);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -147,16 +147,20 @@ class modStock extends DolibarrModules
|
|||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -99,15 +99,20 @@ class modSyslog extends DolibarrModules
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
*/
|
* Data directories are not deleted
|
||||||
function remove()
|
*
|
||||||
{
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -151,24 +151,27 @@ class modTax extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Nettoyage avant activation
|
// Nettoyage avant activation
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql,$options);
|
return $this->_init($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
|
* Data directories are not deleted
|
||||||
*
|
*
|
||||||
* @return int 1 if OK, 0 if KO
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
*/
|
* @return int 1 if OK, 0 if KO
|
||||||
function remove()
|
*/
|
||||||
{
|
function remove($options='')
|
||||||
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ class modUser extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
@@ -244,17 +244,19 @@ class modUser extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when module is disabled.
|
* Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted
|
||||||
*
|
*
|
||||||
* @return int 1 if OK, 0 if KO
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -107,15 +107,18 @@ class modWebServices extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* \param options Options when disabling module
|
* Data directories are not deleted
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove($options='')
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql,$options);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class modWorkflow extends DolibarrModules
|
|||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
@@ -153,20 +153,25 @@ class modWorkflow extends DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
* Function called when module is disabled.
|
||||||
* Supprime de la base les constantes, boites et permissions du module.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
|
* Data directories are not deleted
|
||||||
|
*
|
||||||
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove($options='')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql,$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Create tables and keys required by module
|
* Create tables and keys required by module
|
||||||
* This function is called by this->init.
|
* This function is called by this->init.
|
||||||
* \return int <=0 if KO, >0 if OK
|
*
|
||||||
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function load_tables()
|
function load_tables()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3518,7 +3518,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modProduct($db);
|
$mod=new modProduct($db);
|
||||||
//$mod->remove('noboxes');
|
//$mod->remove('noboxes');
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_SERVICE)) // Permission has changed into 2.7
|
if (! empty($conf->global->MAIN_MODULE_SERVICE)) // Permission has changed into 2.7
|
||||||
@@ -3528,7 +3528,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php');
|
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php');
|
||||||
$mod=new modService($db);
|
$mod=new modService($db);
|
||||||
//$mod->remove('noboxes');
|
//$mod->remove('noboxes');
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_COMMANDE)) // Permission has changed into 2.9
|
if (! empty($conf->global->MAIN_MODULE_COMMANDE)) // Permission has changed into 2.9
|
||||||
@@ -3538,7 +3538,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php');
|
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php');
|
||||||
$mod=new modCommande($db);
|
$mod=new modCommande($db);
|
||||||
//$mod->remove('noboxes');
|
//$mod->remove('noboxes');
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_FACTURE)) // Permission has changed into 2.9
|
if (! empty($conf->global->MAIN_MODULE_FACTURE)) // Permission has changed into 2.9
|
||||||
@@ -3548,7 +3548,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php');
|
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php');
|
||||||
$mod=new modFacture($db);
|
$mod=new modFacture($db);
|
||||||
//$mod->remove('noboxes');
|
//$mod->remove('noboxes');
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_FOURNISSEUR)) // Permission has changed into 2.9
|
if (! empty($conf->global->MAIN_MODULE_FOURNISSEUR)) // Permission has changed into 2.9
|
||||||
@@ -3558,7 +3558,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modFournisseur($db);
|
$mod=new modFournisseur($db);
|
||||||
//$mod->remove('noboxes');
|
//$mod->remove('noboxes');
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3569,7 +3569,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modUser($db);
|
$mod=new modUser($db);
|
||||||
//$mod->remove('noboxes'); // We need to remove because id of module has changed
|
//$mod->remove('noboxes'); // We need to remove because id of module has changed
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_DEPLACEMENT)) // Permission has changed into 3.0
|
if (! empty($conf->global->MAIN_MODULE_DEPLACEMENT)) // Permission has changed into 3.0
|
||||||
@@ -3579,7 +3579,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modDeplacement($db);
|
$mod=new modDeplacement($db);
|
||||||
//$mod->remove('noboxes'); // We need to remove because a permission id has been removed
|
//$mod->remove('noboxes'); // We need to remove because a permission id has been removed
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_DON)) // Permission has changed into 3.0
|
if (! empty($conf->global->MAIN_MODULE_DON)) // Permission has changed into 3.0
|
||||||
@@ -3589,7 +3589,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modDon($db);
|
$mod=new modDon($db);
|
||||||
//$mod->remove('noboxes'); // We need to remove because a permission id has been removed
|
//$mod->remove('noboxes'); // We need to remove because a permission id has been removed
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_ECM)) // Permission has changed into 3.0 and 3.1
|
if (! empty($conf->global->MAIN_MODULE_ECM)) // Permission has changed into 3.0 and 3.1
|
||||||
@@ -3599,7 +3599,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php');
|
$res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php');
|
||||||
$mod=new modECM($db);
|
$mod=new modECM($db);
|
||||||
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
|
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_MODULE_PAYBOX)) // Permission has changed into 3.0
|
if (! empty($conf->global->MAIN_MODULE_PAYBOX)) // Permission has changed into 3.0
|
||||||
@@ -3609,7 +3609,7 @@ function migrate_reload_modules($db,$langs,$conf)
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modPaybox($db);
|
$mod=new modPaybox($db);
|
||||||
$mod->remove('noboxes'); // We need to remove because id of module has changed
|
$mod->remove('noboxes'); // We need to remove because id of module has changed
|
||||||
$mod->init();
|
$mod->init('noboxes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user