Fix error message

This commit is contained in:
Laurent Destailleur 2020-12-27 15:09:27 +01:00
parent f20f4cc599
commit 28642238de
2 changed files with 4 additions and 3 deletions

View File

@ -139,3 +139,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html,
AsciiToHtmlConverter=Ascii to HTML converter AsciiToHtmlConverter=Ascii to HTML converter
AsciiToPdfConverter=Ascii to PDF converter AsciiToPdfConverter=Ascii to PDF converter
TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. TableNotEmptyDropCanceled=Table not empty. Drop has been canceled.
ModuleBuilderNotAllowed=The module builder is enabled but not allowed to your user.

View File

@ -57,8 +57,8 @@ $modulename = dol_sanitizeFileName(GETPOST('modulename', 'alpha'));
$objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha')); $objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha'));
// Security check // Security check
if (empty($conf->modulebuilder->enabled)) accessforbidden('ModuleBuilderNotAllowed'); if (empty($conf->modulebuilder->enabled)) accessforbidden();
if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) accessforbidden('ModuleBuilderNotAllowed'); if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) accessforbidden($langs->trans('ModuleBuilderNotAllowed'));
// Dir for custom dirs // Dir for custom dirs