code syntax admin dir

This commit is contained in:
Frédéric FRANCE
2021-02-26 22:04:03 +01:00
parent 0d4acc53e2
commit 608b933ef5
146 changed files with 8414 additions and 7535 deletions

View File

@@ -29,7 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
global $conf;
if (!$user->admin) accessforbidden();
if (!$user->admin) {
accessforbidden();
}
// Load translation files required by the page
$langs->loadLangs(array("admin", "other"));
@@ -43,19 +45,16 @@ $action = GETPOST('action', 'aZ09');
*/
// Set modes
if ($action == 'set')
{
if ($action == 'set') {
$db->begin();
$result1 = dolibarr_set_const($db, "DEBUGBAR_LOGS_LINES_NUMBER", GETPOST('DEBUGBAR_LOGS_LINES_NUMBER', 'int'), 'chaine', 0, '', 0);
$result2 = dolibarr_set_const($db, "DEBUGBAR_USE_LOG_FILE", GETPOST('DEBUGBAR_USE_LOG_FILE', 'int'), 'chaine', 0, '', 0);
if ($result1 < 0 || $result2 < 0)
{
if ($result1 < 0 || $result2 < 0) {
$error++;
}
if (!$error)
{
if (!$error) {
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@@ -76,8 +75,7 @@ $form = new Form($db);
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("DebugBarSetup"), $linkback, 'title_setup');
if (!function_exists('mb_check_encoding'))
{
if (!function_exists('mb_check_encoding')) {
$langs->load("errors");
print info_admin($langs->trans("ErrorPHPNeedModule", 'mbstring'), 0, 0, 'error');
}