From c6e44139a37bfca59b2b561102b50a4bd11f9db9 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 --- build/rpm/file_contexts.dolibarr | 4 +++ htdocs/admin/system/constall.php | 53 +++++++++++++++++++++++--------- htdocs/conf/conf.php.example | 4 +-- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/build/rpm/file_contexts.dolibarr b/build/rpm/file_contexts.dolibarr index 1ae18e623cd..9dbe838d2ad 100755 --- a/build/rpm/file_contexts.dolibarr +++ b/build/rpm/file_contexts.dolibarr @@ -1,5 +1,9 @@ # This file is useless. # It is provided as example to know contexts modified by installer # to make Dolibarr working. +# +# Note: To allow temporary write permission for httpd: +# chcon -R -h -t httpd_sys_script_rw_t /dirtoallow +# /etc/dolibarr(/.*?) system_u:object_r:httpd_sys_script_rw_t:s0 /var/lib/dolibarr(/.*?) system_u:object_r:httpd_sys_script_rw_t:s0 \ No newline at end of file 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 4b04789c404..9d59caf0cc4 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -254,13 +254,13 @@ $dolibarr_main_prod='0'; ############################## # Value to overwrite path to use shared libraries instead of embedded one -#$dolibarr_lib_ADODB_PATH=''; +#$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; # Value to overwrite path to use shared libraries instead of embedded one #$dolibarr_lib_TCPDF_PATH=''; # 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=''; +#$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 "