Debug v21

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-17 14:21:55 +01:00
parent ef9105cc44
commit 654aa24e8c
2 changed files with 7 additions and 4 deletions

View File

@ -107,7 +107,7 @@ if (!empty($permtodelete) && empty($permissiontodelete)) {
}
// Mass actions. Controls on number of lines checked.
$maxformassaction = (!getDolGlobalString('MAIN_LIMIT_FOR_MASS_ACTIONS') ? 1000 : $conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS);
$maxformassaction = getDolGlobalInt('MAIN_LIMIT_FOR_MASS_ACTIONS', 1000);
if ($massaction && is_array($toselect) && count($toselect) < 1) {
$error++;
setEventMessages($langs->trans("NoRecordSelected"), null, "warnings");

View File

@ -133,6 +133,10 @@ if ($id > 0) {
$result = $object->fetch($id);
}
if (!($object->id > 0) && $action == 'view') {
recordNotFound();
}
// Security check
$id = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('socid');
if ($user->socid) {
@ -186,7 +190,8 @@ if (empty($reshook)) {
// Mass actions
$objectclass = 'WebsiteAccount';
$objectlabel = 'WebsiteAccount';
$uploaddir = $conf->societe->multidir_output[$object->entity];
$uploaddir = empty($conf->societe->multidir_output[$object->entity]) ? $conf->societe->dir_output : $conf->societe->multidir_output[$object->entity];
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@ -196,8 +201,6 @@ if (empty($reshook)) {
* View
*/
$contactstatic = new Contact($db);
$form = new Form($db);
$langs->load("companies");