Merge pull request #17769 from frederic34/patch-21

force reload css after activate/desactivate module
This commit is contained in:
Laurent Destailleur 2021-06-04 10:40:34 +02:00 committed by GitHub
commit 86a5eead5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -246,6 +247,7 @@ if ($action == 'install') {
if ($action == 'set' && $user->admin) {
$resarray = activateModule($value);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
if (!empty($resarray['errors'])) {
setEventMessages('', $resarray['errors'], 'errors');
} else {
@ -269,6 +271,7 @@ if ($action == 'set' && $user->admin) {
exit;
} elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') {
$result = unActivateModule($value);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}