diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index 63e8088e62c..8ad87f5112d 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -213,224 +213,159 @@ print '';
print '
';
-
-// Parameters in conf.php file (when a parameter start with ?, it is shown only if defined)
-$configfileparameters=array(
-'dolibarr_main_url_root',
-'dolibarr_main_url_root_alt',
-'dolibarr_main_document_root',
-'dolibarr_main_document_root_alt',
-'dolibarr_main_data_root',
-'separator',
-'dolibarr_main_db_host',
-'dolibarr_main_db_port',
-'dolibarr_main_db_name',
-'dolibarr_main_db_type',
-'dolibarr_main_db_user',
-'dolibarr_main_db_pass',
-'dolibarr_main_db_character_set',
-'dolibarr_main_db_collation',
-'?dolibarr_main_db_prefix',
-'separator',
-'dolibarr_main_authentication',
-'separator',
-'?dolibarr_main_auth_ldap_login_attribute',
-'?dolibarr_main_auth_ldap_host',
-'?dolibarr_main_auth_ldap_port',
-'?dolibarr_main_auth_ldap_version',
-'?dolibarr_main_auth_ldap_dn',
-'?dolibarr_main_auth_ldap_admin_login',
-'?dolibarr_main_auth_ldap_admin_pass',
-'?dolibarr_main_auth_ldap_debug',
-'separator',
-'?dolibarr_lib_ADODB_PATH',
-'?dolibarr_lib_TCPDF_PATH',
-'?dolibarr_lib_FPDI_PATH',
-'?dolibarr_lib_NUSOAP_PATH',
-'?dolibarr_lib_PHPEXCEL_PATH',
-'?dolibarr_lib_GEOIP_PATH',
-'?dolibarr_lib_ODTPHP_PATH',
-'?dolibarr_lib_ODTPHP_PATHTOPCLZIP',
-'?dolibarr_js_CKEDITOR',
-'?dolibarr_js_JQUERY',
-'?dolibarr_js_JQUERY_UI',
-'?dolibarr_js_JQUERY_FLOT',
-'?dolibarr_font_DOL_DEFAULT_TTF',
-'?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
-'separator',
-'?dolibarr_mailing_limit_sendbyweb',
-'?dolibarr_strict_mode'
-);
-$configfilelib=array(
-// 'separator',
-$langs->trans("URLRoot"),
-$langs->trans("URLRoot").' (alt)',
-$langs->trans("DocumentRootServer"),
-$langs->trans("DocumentRootServer").' (alt)',
-$langs->trans("DataRootServer"),
-'separator',
-$langs->trans("DatabaseServer"),
-$langs->trans("DatabasePort"),
-$langs->trans("DatabaseName"),
-$langs->trans("DriverType"),
-$langs->trans("DatabaseUser"),
-$langs->trans("DatabasePassword"),
-$langs->trans("DBStoringCharset"),
-$langs->trans("DBSortingCharset"),
-$langs->trans("Prefix"),
-'separator',
-$langs->trans("AuthenticationMode"),
-'separator',
-'dolibarr_main_auth_ldap_login_attribute',
-'dolibarr_main_auth_ldap_host',
-'dolibarr_main_auth_ldap_port',
-'dolibarr_main_auth_ldap_version',
-'dolibarr_main_auth_ldap_dn',
-'dolibarr_main_auth_ldap_admin_login',
-'dolibarr_main_auth_ldap_admin_pass',
-'dolibarr_main_auth_ldap_debug',
-'separator',
-'dolibarr_lib_ADODB_PATH',
-'dolibarr_lib_TCPDF_PATH',
-'dolibarr_lib_FPDI_PATH',
-'dolibarr_lib_NUSOAP_PATH',
-'dolibarr_lib_PHPEXCEL_PATH',
-'dolibarr_lib_GEOIP_PATH',
-'dolibarr_lib_ODTPHP_PATH',
-'dolibarr_lib_ODTPHP_PATHTOPCLZIP',
-'dolibarr_js_CKEDITOR',
-'dolibarr_js_JQUERY',
-'dolibarr_js_JQUERY_UI',
-'dolibarr_js_JQUERY_FLOT',
-'dolibarr_font_DOL_DEFAULT_TTF',
-'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
-'separator',
-'Limit nb of email sent by page',
-'Strict mode is on/off'
-);
-$var=true;
-print '
';
+
+// Parameters in conf.php file (when a parameter start with ?, it is shown only if defined)
+$configfileparameters=array(
+ 'dolibarr_main_url_root' => $langs->trans("URLRoot"),
+ 'dolibarr_main_url_root_alt' => $langs->trans("URLRoot").' (alt)',
+ 'dolibarr_main_document_root'=> $langs->trans("DocumentRootServer"),
+ 'dolibarr_main_document_root_alt' => $langs->trans("DocumentRootServer").' (alt)',
+ 'dolibarr_main_data_root' => $langs->trans("DataRootServer"),
+ 'separator' => '',
+ 'dolibarr_main_db_host' => $langs->trans("DatabaseServer"),
+ 'dolibarr_main_db_port' => $langs->trans("DatabasePort"),
+ 'dolibarr_main_db_name' => $langs->trans("DatabaseName"),
+ 'dolibarr_main_db_type' => $langs->trans("DriverType"),
+ 'dolibarr_main_db_user' => $langs->trans("DatabaseUser"),
+ 'dolibarr_main_db_pass' => $langs->trans("DatabasePassword"),
+ 'dolibarr_main_db_character_set' => $langs->trans("DBStoringCharset"),
+ 'dolibarr_main_db_collation' => $langs->trans("DBSortingCollation"),
+ '?dolibarr_main_db_prefix' => $langs->trans("Prefix"),
+ 'separator' => '',
+ 'dolibarr_main_authentication' => $langs->trans("AuthenticationMode"),
+ 'separator'=> '',
+ '?dolibarr_main_auth_ldap_login_attribute' => 'dolibarr_main_auth_ldap_login_attribute',
+ '?dolibarr_main_auth_ldap_host' => 'dolibarr_main_auth_ldap_host',
+ '?dolibarr_main_auth_ldap_port' => 'dolibarr_main_auth_ldap_port',
+ '?dolibarr_main_auth_ldap_version' => 'dolibarr_main_auth_ldap_version',
+ '?dolibarr_main_auth_ldap_dn' => 'dolibarr_main_auth_ldap_dn',
+ '?dolibarr_main_auth_ldap_admin_login' => 'dolibarr_main_auth_ldap_admin_login',
+ '?dolibarr_main_auth_ldap_admin_pass' => 'dolibarr_main_auth_ldap_admin_pass',
+ '?dolibarr_main_auth_ldap_debug' => 'dolibarr_main_auth_ldap_debug',
+ 'separator' => '',
+ '?dolibarr_lib_ADODB_PATH' => 'dolibarr_lib_ADODB_PATH',
+ '?dolibarr_lib_TCPDF_PATH' => 'dolibarr_lib_TCPDF_PATH',
+ '?dolibarr_lib_FPDI_PATH' => 'dolibarr_lib_FPDI_PATH',
+ '?dolibarr_lib_NUSOAP_PATH' => 'dolibarr_lib_NUSOAP_PATH',
+ '?dolibarr_lib_PHPEXCEL_PATH' => 'dolibarr_lib_PHPEXCEL_PATH',
+ '?dolibarr_lib_GEOIP_PATH' => 'dolibarr_lib_GEOIP_PATH',
+ '?dolibarr_lib_ODTPHP_PATH' => 'dolibarr_lib_ODTPHP_PATH',
+ '?dolibarr_lib_ODTPHP_PATHTOPCLZIP' => 'dolibarr_lib_ODTPHP_PATHTOPCLZIP',
+ '?dolibarr_js_CKEDITOR' => 'dolibarr_js_CKEDITOR',
+ '?dolibarr_js_JQUERY' => 'dolibarr_js_JQUERY',
+ '?dolibarr_js_JQUERY_UI' => 'dolibarr_js_JQUERY_UI',
+ '?dolibarr_js_JQUERY_FLOT' => 'dolibarr_js_JQUERY_FLOT',
+ '?dolibarr_font_DOL_DEFAULT_TTF' => 'dolibarr_font_DOL_DEFAULT_TTF',
+ '?dolibarr_font_DOL_DEFAULT_TTF_BOLD' => 'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
+ 'separator' => '',
+ '?dolibarr_mailing_limit_sendbyweb' => 'Limit nb of email sent by page',
+ '?dolibarr_strict_mode' => 'Strict mode is on/off'
+);
+
+$var=true;
+print '';
print '';
print '| '.$langs->trans("Parameters").' ';
-print $langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')';
-print ' | ';
-print ''.$langs->trans("Parameter").' | ';
-print ''.$langs->trans("Value").' | ';
-print '
'."\n";
-$i=0;
-foreach($configfileparameters as $key)
-{
- $ignore=0;
-
- if ($key == 'dolibarr_main_url_root_alt' && empty(${
- $key})) $ignore=1;
- if ($key == 'dolibarr_main_document_root_alt' && empty(${
- $key})) $ignore=1;
-
- if (empty($ignore))
- {
- $newkey = preg_replace('/^\?/','',$key);
-
- if (preg_match('/^\?/',$key) && empty(${
- $newkey}))
- {
- $i++;
- continue; // We discard parametes starting with ?
- }
-
- if ($newkey == 'separator' && $lastkeyshown == 'separator')
- {
- $i++;
- continue;
- }
-
- $var=!$var;
- print "";
- if ($newkey == 'separator')
- {
- print '| | ';
- }
- else
- {
- // Label
- print "".$configfilelib[$i].' | ';
- // Key
- print ''.$newkey.' | ';
- // Value
- print "";
- if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${
- $newkey});
- else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${
- $newkey})) print ${
- $newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
- else if ($newkey == 'dolibarr_main_url_root_alt' && preg_match('/__auto__/',${
- $newkey})) print ${
- $newkey}.' => '.constant('DOL_MAIN_URL_ROOT_ALT');
- else print ${
- $newkey};
- if ($newkey == 'dolibarr_main_url_root' && $newkey != DOL_MAIN_URL_ROOT) print ' (currently used by autodetect: '.DOL_MAIN_URL_ROOT.')';
- print " | ";
- }
- print "
\n";
- $lastkeyshown=$newkey;
- }
- $i++;
-}
-print '
';
-print '
';
-
-
-
-// Parameters in database
-print '';
-print '';
-print '| '.$langs->trans("Parameters").' '.$langs->trans("Database").' | ';
-print ''.$langs->trans("Value").' | ';
-if (empty($conf->multicompany->enabled) || !$user->entity) print ''.$langs->trans("Entity").' | '; // If superadmin or multicompany disabled
-print "
\n";
-
-$sql = "SELECT";
-$sql.= " rowid";
-$sql.= ", ".$db->decrypt('name')." as name";
-$sql.= ", ".$db->decrypt('value')." as value";
-$sql.= ", type";
-$sql.= ", note";
-$sql.= ", entity";
-$sql.= " FROM ".MAIN_DB_PREFIX."const";
-if (empty($conf->multicompany->enabled))
-{
- // If no multicompany mode, admins can see global and their constantes
- $sql.= " WHERE entity IN (0,".$conf->entity.")";
-}
-else
-{
- // If multicompany mode, superadmin (user->entity=0) can see everything, admin are limited to their entities.
- if ($user->entity) $sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
-}
-$sql.= " ORDER BY entity, name ASC";
-$resql = $db->query($sql);
-if ($resql)
-{
- $num = $db->num_rows($resql);
- $i = 0;
- $var=True;
-
- while ($i < $num)
- {
- $obj = $db->fetch_object($resql);
- $var=!$var;
-
- print '';
- print '| '.$obj->name.' | '."\n";
- print ''.$obj->value.' | '."\n";
- if (empty($conf->multicompany->enabled) || !$user->entity) print ''.$obj->entity.' | '."\n"; // If superadmin or multicompany disabled
- print "
\n";
-
- $i++;
- }
-}
-
-print '
';
+print $langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')';
+print '';
+print ''.$langs->trans("Parameter").' | ';
+print ''.$langs->trans("Value").' | ';
+print ''."\n";
+
+foreach($configfileparameters as $key => $value)
+{
+ $ignore=0;
+
+ if ($key == 'dolibarr_main_url_root_alt' && empty(${$key})) $ignore=1;
+ if ($key == 'dolibarr_main_document_root_alt' && empty(${$key})) $ignore=1;
+
+ if (empty($ignore))
+ {
+ $newkey = preg_replace('/^\?/','',$key);
+
+ if (preg_match('/^\?/',$key) && empty(${$newkey})) continue; // We discard parametes starting with ?
+ if ($newkey == 'separator' && $lastkeyshown == 'separator') continue;
+
+ $var=!$var;
+ print "";
+ if ($newkey == 'separator')
+ {
+ print '| | ';
+ }
+ else
+ {
+ // Label
+ print "".$value.' | ';
+ // Key
+ print ''.$newkey.' | ';
+ // Value
+ print "";
+ if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
+ else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
+ else if ($newkey == 'dolibarr_main_url_root_alt' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT_ALT');
+ else print ${$newkey};
+ if ($newkey == 'dolibarr_main_url_root' && $newkey != DOL_MAIN_URL_ROOT) print ' (currently used by autodetect: '.DOL_MAIN_URL_ROOT.')';
+ print " | ";
+ }
+ print "
\n";
+ $lastkeyshown=$newkey;
+ }
+}
+print '
';
+print '
';
+
+
+
+// Parameters in database
+print '';
+print '';
+print '| '.$langs->trans("Parameters").' '.$langs->trans("Database").' | ';
+print ''.$langs->trans("Value").' | ';
+if (empty($conf->multicompany->enabled) || !$user->entity) print ''.$langs->trans("Entity").' | '; // If superadmin or multicompany disabled
+print "
\n";
+
+$sql = "SELECT";
+$sql.= " rowid";
+$sql.= ", ".$db->decrypt('name')." as name";
+$sql.= ", ".$db->decrypt('value')." as value";
+$sql.= ", type";
+$sql.= ", note";
+$sql.= ", entity";
+$sql.= " FROM ".MAIN_DB_PREFIX."const";
+if (empty($conf->multicompany->enabled))
+{
+ // If no multicompany mode, admins can see global and their constantes
+ $sql.= " WHERE entity IN (0,".$conf->entity.")";
+}
+else
+{
+ // If multicompany mode, superadmin (user->entity=0) can see everything, admin are limited to their entities.
+ if ($user->entity) $sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
+}
+$sql.= " ORDER BY entity, name ASC";
+$resql = $db->query($sql);
+if ($resql)
+{
+ $num = $db->num_rows($resql);
+ $i = 0;
+ $var=True;
+
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object($resql);
+ $var=!$var;
+
+ print '';
+ print '| '.$obj->name.' | '."\n";
+ print ''.$obj->value.' | '."\n";
+ if (empty($conf->multicompany->enabled) || !$user->entity) print ''.$obj->entity.' | '."\n"; // If superadmin or multicompany disabled
+ print "
\n";
+
+ $i++;
+ }
+}
+
+print '
';