Fix bad error when module not enabled

This commit is contained in:
Laurent Destailleur 2019-08-28 13:11:51 +02:00
parent 55334dff3b
commit b05b3e897f
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}

View File

@ -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
{