Fix bad error when module not enabled
This commit is contained in:
parent
55334dff3b
commit
b05b3e897f
@ -39,7 +39,7 @@
|
|||||||
// Protection
|
// Protection
|
||||||
if (empty($objectclass) || empty($uploaddir))
|
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;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -107,6 +107,7 @@ if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default se
|
|||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
if (empty($conf->mymodule->enabled)) accessforbidden('Module not enabled');
|
||||||
$socid=0;
|
$socid=0;
|
||||||
if ($user->societe_id > 0) // Protection if external user
|
if ($user->societe_id > 0) // Protection if external user
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user