forked from Wavyzz/dolibarr
Fix: boxes must not be removed after update
This commit is contained in:
@@ -188,22 +188,27 @@ class modService extends DolibarrModules
|
||||
function init($options='')
|
||||
{
|
||||
// Permissions et valeurs par defaut
|
||||
$this->remove();
|
||||
$this->remove($options);
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql,$options);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction appelee lors de la desactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
return $this->_remove($sql,$options);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user