Fix bad error when module not enabled
This commit is contained in:
parent
f21cb54ae6
commit
85016a7a45
@ -39,7 +39,7 @@
|
||||
// Protection
|
||||
if (empty($objectclass) || empty($uploaddir))
|
||||
{
|
||||
dol_print_error(null, 'include of actions_massactions.inc.php is done but var $massaction or $objectclass or $uploaddir was not defined');
|
||||
dol_print_error(null, 'include of actions_massactions.inc.php is done but var $objectclass or $uploaddir was not defined');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -107,6 +107,7 @@ if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default se
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
// Security check
|
||||
if (empty($conf->mymodule->enabled)) accessforbidden('Module not enabled');
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) // Protection if external user
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user