From 263ab6eac8046f26cd69ea10afc2c06f8f2fc2b0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Sep 2011 14:34:15 +0000 Subject: [PATCH] Work on rpm package --- build/rpm/dolibarr_fedora.spec | 2 - htdocs/admin/system/constall.php | 67 ++++++------------------ htdocs/conf/conf.php.example | 2 +- htdocs/webservices/admin/webservices.php | 5 +- htdocs/webservices/index.php | 3 -- 5 files changed, 19 insertions(+), 60 deletions(-) diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 46079f3c665..81112a18cab 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -103,8 +103,6 @@ cui hai bisogno ed essere facile da usare. %{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz %{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name} %{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name} -%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime -%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap # Lang for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_* diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index d837be49912..af09e33cfeb 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -63,25 +63,14 @@ $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', - 'separator', - '?dolibarr_lib_ADODB_PATH', - '?dolibarr_lib_TCPDF_PATH', - '?dolibarr_lib_FPDFI_PATH', - '?dolibarr_lib_NUSOAP_PATH', - '?dolibarr_lib_PHPEXCEL_PATH', - '?dolibarr_lib_GEOIP_PATH', - '?dolibarr_lib_ODTPHP_PATH', - '?dolibarr_lib_ODTPHP_PATHTOPCLZIP', - '?dolibarr_font_DOL_DEFAULT_TTF', - '?dolibarr_font_DOL_DEFAULT_TTF_BOLD' + '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' ); $configfilelib=array( // 'separator', @@ -109,18 +98,7 @@ $configfilelib=array( '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_FPDFI_PATH', - 'dolibarr_lib_NUSOAP_PATH', - 'dolibarr_lib_PHPEXCEL_PATH', - 'dolibarr_lib_GEOIP_PATH', - 'dolibarr_lib_ODTPHP_PATH', - 'dolibarr_lib_ODTPHP_PATHTOPCLZIP', - 'dolibarr_font_DOL_DEFAULT_TTF', - 'dolibarr_font_DOL_DEFAULT_TTF_BOLD' + 'dolibarr_main_auth_ldap_debug' ); $var=true; print ''; @@ -138,23 +116,9 @@ 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 ($newkey == 'separator') + if ($key == 'separator') { print ''; } @@ -163,17 +127,16 @@ 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 9d59caf0cc4..a4853304eda 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/nusoap/'; +#$dolibarr_lib_NUSOAP_PATH='/usr/share/php/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 diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php index 128b13106e6..8ab85c8ee05 100644 --- a/htdocs/webservices/admin/webservices.php +++ b/htdocs/webservices/admin/webservices.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -92,7 +92,7 @@ print ""; print ''; -dol_htmloutput_mesg($mesg); +if ($mesg) print '
'.$mesg; print '

'; @@ -140,6 +140,7 @@ if ($conf->fournisseur->enabled) } print '
'; +dol_htmloutput_mesg($mesg); $db->close(); diff --git a/htdocs/webservices/index.php b/htdocs/webservices/index.php index d99da75f9aa..097c53bfe87 100644 --- a/htdocs/webservices/index.php +++ b/htdocs/webservices/index.php @@ -91,9 +91,6 @@ if ($conf->fournisseur->enabled) } print '
'; -print '
'; -print 'NUSoap library path used by Dolibarr: '.NUSOAP_PATH.'
'; -print '
'; $db->close();
 ".$configfilelib[$i].''.$newkey.''.$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}; + 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}; print "