Fixing style errors.

This commit is contained in:
stickler-ci 2023-02-07 13:58:29 +00:00
parent b67a676c89
commit 23d212d9dc

View File

@ -2047,11 +2047,9 @@ if ($dirins && $action == 'addright' && !empty($module) && empty($cancel)) {
dolReplaceInFile($moduledescriptorfile, array('/* END MODULEBUILDER PERMISSIONS */' => '/*'.strtoupper($objectForPerms).'*/'.$rightToAdd."/*END ".strtoupper($objectForPerms).'*/'."\n\t\t"."/* END MODULEBUILDER PERMISSIONS */")); dolReplaceInFile($moduledescriptorfile, array('/* END MODULEBUILDER PERMISSIONS */' => '/*'.strtoupper($objectForPerms).'*/'.$rightToAdd."/*END ".strtoupper($objectForPerms).'*/'."\n\t\t"."/* END MODULEBUILDER PERMISSIONS */"));
setEventMessages($langs->trans('PermissionAddedSuccesfuly'), null); setEventMessages($langs->trans('PermissionAddedSuccesfuly'), null);
} }
} }
header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=permissions&module='.$module); header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=permissions&module='.$module);
exit; exit;
} }
// Delete permission // Delete permission
@ -2112,8 +2110,7 @@ if ($dirins && $action == 'confirm_deleteright' && !empty($module) && GETPOST('p
setEventMessages($langs->trans('PermissionDeletedSuccesfuly'), null); setEventMessages($langs->trans('PermissionDeletedSuccesfuly'), null);
setEventMessages($langs->trans('WarningModuleNeedRefrech', $langs->transnoentities($module)), null, 'warnings'); setEventMessages($langs->trans('WarningModuleNeedRefrech', $langs->transnoentities($module)), null, 'warnings');
exit; exit;
} } else {
else{
header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=permissions&module='.$module); header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=permissions&module='.$module);
setEventMessages($langs->trans('PermissionDeletedSuccesfuly'), null); setEventMessages($langs->trans('PermissionDeletedSuccesfuly'), null);
exit; exit;
@ -2214,7 +2211,6 @@ if ($dirins && GETPOST('action') == 'update_right' && GETPOST('modifyright')&& e
\$r++; \$r++;
"; ";
if (!$error) { if (!$error) {
if (isModEnabled(strtolower($module))) { if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module)); $result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
@ -2232,7 +2228,6 @@ if ($dirins && GETPOST('action') == 'update_right' && GETPOST('modifyright')&& e
setEventMessages($langs->trans('PermissionUpdatedSuccesfuly'), null); setEventMessages($langs->trans('PermissionUpdatedSuccesfuly'), null);
exit; exit;
} }
} }
// Save file // Save file
if ($action == 'savefile' && empty($cancel)) { if ($action == 'savefile' && empty($cancel)) {