mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-14 08:54:21 +01:00
code syntax admin dir
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user