Merge pull request #21996 from dolibit-ut/patch-493

Update ecm.php
This commit is contained in:
Laurent Destailleur 2022-08-31 14:52:19 +02:00 committed by GitHub
commit ddd596e35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,8 @@
* \brief Page to setup ECM (GED) module
*/
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
@ -37,6 +39,8 @@ if (!$user->admin) {
/*
* Action
*/
// set
if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
$code = $reg[1];
if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) {
@ -47,6 +51,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
}
}
// delete
if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
$code = $reg[1];
if (dolibarr_del_const($db, $code, $conf->entity) > 0) {