mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Error management on emailcollector edition
This commit is contained in:
parent
083b6a8c87
commit
4fcf606d04
|
|
@ -135,12 +135,13 @@ if ($action == 'deletefilter')
|
|||
{
|
||||
$emailcollectorfilter = new EmailCollectorFilter($db);
|
||||
$emailcollectorfilter->fetch(GETPOST('filterid', 'int'));
|
||||
$result = $emailcollectorfilter->delete($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$object->fetchFilters();
|
||||
} else {
|
||||
setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors');
|
||||
if ($emailcollectorfilter->id > 0) {
|
||||
$result = $emailcollectorfilter->delete($user);
|
||||
if ($result > 0) {
|
||||
$object->fetchFilters();
|
||||
} else {
|
||||
setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -204,12 +205,13 @@ if ($action == 'deleteoperation')
|
|||
{
|
||||
$emailcollectoroperation = new EmailCollectorAction($db);
|
||||
$emailcollectoroperation->fetch(GETPOST('operationid', 'int'));
|
||||
$result = $emailcollectoroperation->delete($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$object->fetchActions();
|
||||
} else {
|
||||
setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors');
|
||||
if ($emailcollectoroperation->id > 0) {
|
||||
$result = $emailcollectoroperation->delete($user);
|
||||
if ($result > 0) {
|
||||
$object->fetchActions();
|
||||
} else {
|
||||
setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl
|
|||
// Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions)
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST' ||
|
||||
((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) ||
|
||||
in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof', 'deletepayment', 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_reject_check')))
|
||||
in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_reject_check')))
|
||||
{
|
||||
if (!GETPOSTISSET('token')) {
|
||||
if (GETPOST('uploadform', 'int')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user