From 86ae2f4f22127805f7db8f0615032fd050b95939 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Sep 2011 14:50:18 +0000 Subject: [PATCH] New: Show param to overwite lib path --- htdocs/admin/system/constall.php | 53 +++++++++++++++++++++++--------- htdocs/conf/conf.php.example | 2 +- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index af09e33cfeb..c9c0e6edce9 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -63,14 +63,18 @@ $configfileparameters=array( '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' + '?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_ODTPHP_PATH', + '?dolibarr_lib_ODTPHP_PATHTOPCLZIP' ); $configfilelib=array( // 'separator', @@ -98,7 +102,11 @@ $configfilelib=array( 'dolibarr_main_auth_ldap_dn', 'dolibarr_main_auth_ldap_admin_login', 'dolibarr_main_auth_ldap_admin_pass', - 'dolibarr_main_auth_ldap_debug' + 'dolibarr_main_auth_ldap_debug', + 'separator', + 'dolibarr_lib_ADODB_PATH', + 'dolibarr_lib_ODTPHP_PATH', + 'dolibarr_lib_ODTPHP_PATHTOPCLZIP' ); $var=true; print ''; @@ -116,9 +124,23 @@ foreach($configfileparameters as $key) 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 ($key == 'separator') + if ($newkey == 'separator') { print ''; } @@ -127,16 +149,17 @@ foreach($configfileparameters as $key) // Label print "'; // Key - print ''; + print ''; // Value print ""; } print "\n"; + $lastkeyshown=$newkey; } $i++; } diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index a4853304eda..9d59caf0cc4 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -260,7 +260,7 @@ $dolibarr_main_prod='0'; # Value to overwrite path to use shared libraries instead of embedded one #$dolibarr_lib_FPDFI_PATH=''; # Value to overwrite path to use shared libraries instead of embedded one -#$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap/'; +#$dolibarr_lib_NUSOAP_PATH='/usr/share/nusoap/'; # Value to overwrite path to use shared libraries instead of embedded one #$dolibarr_lib_PHPEXCEL_PATH=''; # Value to overwrite path to use shared libraries instead of embedded one
 ".$configfilelib[$i].''.$key.''.$newkey.'"; - if ($key == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$key}); - else if ($key == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$key})) print ${$key}.' => '.constant('DOL_MAIN_URL_ROOT'); - else if ($key == 'dolibarr_main_url_root_alt' && preg_match('/__auto__/',${$key})) print ${$key}.' => '.constant('DOL_MAIN_URL_ROOT_ALT'); - else print ${$key}; + 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}; print "