From f11d477770c7eebdf02c2440deefe1b5b1f8816f Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 24 Jul 2013 13:28:02 +0200 Subject: [PATCH 1/4] Fix bug export contact extrafields --- htdocs/core/modules/modSociete.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 89bc88181df..73ce8eb8c01 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -329,6 +329,7 @@ class modSociete extends DolibarrModules $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'socpeople as c'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON c.fk_pays = p.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra ON extra.fk_object = c.rowid'; $this->export_sql_end[$r] .=' WHERE c.entity IN ('.getEntity("societe", 1).')'; From e8400afebabc99437d535e04ad38859c39f2aa07 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 24 Jul 2013 13:46:50 +0200 Subject: [PATCH 2/4] Fix: rpm packages Conflicts: build/rpm/dolibarr_generic.spec --- build/rpm/dolibarr_generic.spec | 15 +++++++++++++-- build/rpm/dolibarr_mandriva.spec | 3 +++ build/rpm/dolibarr_opensuse.spec | 4 +--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index efa2ba5b12b..fbdb1d9bf06 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -448,11 +448,22 @@ if [ -f %{_sysconfdir}/init.d/apache2 ]; then %{_sysconfdir}/init.d/apache2 restart fi -# Restart mysql -echo Restart mysql +# Restart mysql server +echo Restart mysql server +%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} + /sbin/service mysqld restart +%else +%if 0%{?suse_version} + /sbin/service mysql restart +%else if [ -f /etc/init.d/mysqld ]; then /etc/init.d/mysqld restart fi +if [ -f /etc/init.d/mysql ]; then + /etc/init.d/mysql restart +fi +%endif +%endif # Show result echo diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 54878c1c568..ab4f32080e7 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -278,6 +278,9 @@ echo Restart mysql if [ -f /etc/init.d/mysqld ]; then /etc/init.d/mysqld restart fi +if [ -f /etc/init.d/mysql ]; then + /etc/init.d/mysql restart +fi # Show result echo diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index a996497f273..35d05de2c53 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -286,9 +286,7 @@ fi # Restart mysql echo Restart mysql -if [ -f /etc/init.d/mysqld ]; then - /etc/init.d/mysqld restart -fi +/sbin/service mysql restart # Show result echo From f32bc24285a37ba5f99654018b001726a7951c3c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 24 Jul 2013 13:49:40 +0200 Subject: [PATCH 3/4] Fix: Upgrade of package break install Conflicts: build/rpm/dolibarr_fedora.spec build/rpm/dolibarr_generic.spec --- build/rpm/dolibarr_fedora.spec | 47 +++++++------- build/rpm/dolibarr_generic.spec | 104 +++++++++++++++++-------------- build/rpm/dolibarr_mandriva.spec | 51 ++++++++------- build/rpm/dolibarr_opensuse.spec | 54 +++++++++------- 4 files changed, 144 insertions(+), 112 deletions(-) diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index a72b4955342..69553f983b1 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -302,35 +302,38 @@ echo "-------------------------------------------------------" echo -#---- postun (after uninstall) +#---- postun (after upgrade or uninstall) %postun -# Define vars -export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - -# Remove apache link -if [ -L $apachelink ] ; +if [ "x$1" = "x0" ] ; then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge -fi + # Remove + echo "Removed package" -# Restart web servers if required -if [ "x$status" = "xpurge" ] ; -then - # Restart web server - echo Restart web server - if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart - fi - if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart - fi + # Define vars + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + /sbin/service httpd restart + fi +else + # Upgrade + echo "No remove ation done (this is an upgrade)" fi - %changelog * Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index fbdb1d9bf06..7e0c426a53d 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -478,59 +478,71 @@ echo -#---- postun (after uninstall) +#---- postun (after upgrade or uninstall) %postun -# Define vars -os='unknown'; -%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} -export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" -%else -%if 0%{?suse_version} -export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" -%else -if [ -d %{_sysconfdir}/httpd/conf.d ]; then - export os='fedora-redhat'; - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" -fi -if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then - export os='opensuse'; - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" -fi -if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then - export os='mageia-mandriva'; - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" -fi -if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then - export os='ubuntu-debian'; - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" -fi -%endif -%endif - -# Remove apache link -if [ -L $apachelink ] ; +if [ "x$1" = "x0" ] ; then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge -fi + # Remove + echo "Removed package" -# Restart web servers if required -if [ "x$status" = "xpurge" ] ; -then - # Restart web server - echo Restart web server - if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart - fi - if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart - fi + # Define vars + os='unknown'; + %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + %else + %if 0%{?suse_version} + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + %else + if [ -d %{_sysconfdir}/httpd/conf.d ]; then + export os='fedora-redhat'; + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + fi + if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then + export os='opensuse'; + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + fi + if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then + export os='mageia-mandriva'; + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + fi + if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then + export os='ubuntu-debian'; + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + fi + %endif + %endif + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} + /sbin/service httpd restart + %else + if [ -f %{_sysconfdir}/init.d/httpd ]; then + %{_sysconfdir}/init.d/httpd restart + fi + if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart + fi + %endif + fi +else + # Upgrade + echo "No remove ation done (this is an upgrade)" fi - %changelog * Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index ab4f32080e7..04ce7640657 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -294,31 +294,40 @@ echo "-------------------------------------------------------" echo -#---- postun (after uninstall) +#---- postun (after upgrade or uninstall) %postun -# Define vars -export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - -# Remove apache link -if [ -L $apachelink ] ; +if [ "x$1" = "x0" ] ; then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge -fi + # Remove + echo "Removed package" -# Restart web servers if required -if [ "x$status" = "xpurge" ] ; -then - # Restart web server - echo Restart web server - if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart - fi - if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart - fi + # Define vars + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + if [ -f %{_sysconfdir}/init.d/httpd ]; then + %{_sysconfdir}/init.d/httpd restart + fi + if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart + fi + fi +else + # Upgrade + echo "No remove ation done (this is an upgrade)" fi diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 35d05de2c53..3a35aaa9bc6 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -300,34 +300,42 @@ echo "-------------------------------------------------------" echo -#---- postun (after uninstall) +#---- postun (after upgrade or uninstall) %postun -# Define vars -export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" - -# Remove apache link -if [ -L $apachelink ] ; +if [ "x$1" = "x0" ] ; then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge + # Remove + echo "Removed package" + + # Define vars + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + if [ -f %{_sysconfdir}/init.d/httpd ]; then + %{_sysconfdir}/init.d/httpd restart + fi + if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart + fi + fi +else + # Upgrade + echo "No remove ation done (this is an upgrade)" fi -# Restart web servers if required -if [ "x$status" = "xpurge" ] ; -then - # Restart web server - echo Restart web server - if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart - fi - if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart - fi -fi - - %changelog * Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3 From 7cf429d23863ae8b4a00700de862152de62dbb42 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 24 Jul 2013 15:04:09 +0200 Subject: [PATCH 4/4] Fix: Color change on page break. --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 2 ++ htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 ++ htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 5e4d5d1395c..538a5b02be8 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1204,6 +1204,8 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($carac_client_name,50)*4)); $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L'); } + + $pdf->SetTextColor(0,0,0); } /** diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 453860ba192..d0c7a9972d8 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1410,6 +1410,8 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($carac_client_name,50)*4)); $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L'); } + + $pdf->SetTextColor(0,0,0); } /** diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 8de154861ac..ed63d09715b 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1273,6 +1273,8 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($carac_client_name,50)*4)); $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L'); } + + $pdf->SetTextColor(0,0,0); } /**