From a0fb27bd80dcd528ee740f514166e82e97dddda8 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 15 Sep 2015 14:34:49 +0200 Subject: [PATCH 01/11] FIX : Can create Proposal on close thridparty #3526 --- htdocs/comm/card.php | 12 ++++++------ htdocs/comm/propal.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 450a462c751..75e102b96bb 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -828,25 +828,25 @@ if ($id > 0) print '
'; - if (! empty($conf->propal->enabled) && $user->rights->propal->creer) + if (! empty($conf->propal->enabled) && $user->rights->propal->creer && $object->status==1) { $langs->load("propal"); print ''; } - if (! empty($conf->commande->enabled) && $user->rights->commande->creer) + if (! empty($conf->commande->enabled) && $user->rights->commande->creer && $object->status==1) { $langs->load("orders"); print ''; } - if ($user->rights->contrat->creer) + if ($user->rights->contrat->creer && $object->status==1) { $langs->load("contracts"); print ''; } - if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) + if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer && $object->status==1) { $langs->load("fichinter"); print ''; @@ -855,7 +855,7 @@ if ($id > 0) // Add invoice if ($user->societe_id == 0) { - if (! empty($conf->deplacement->enabled)) + if (! empty($conf->deplacement->enabled) && $object->status==1) { $langs->load("trips"); print ''; @@ -863,7 +863,7 @@ if ($id > 0) if (! empty($conf->facture->enabled)) { - if ($user->rights->facture->creer) + if ($user->rights->facture->creer && $object->status==1) { $langs->load("bills"); $langs->load("orders"); diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index b5302063a65..5fef6f8ae29 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1267,7 +1267,7 @@ if ($action == 'create') print ''; } else { print ''; - print $form->select_company('', 'socid', 's.client = 1 OR s.client = 2 OR s.client = 3', 1); + print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1); print ''; } print '' . "\n"; From 8fd9d2a7cefc5b932ea2c908258207776036b920 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 16 Sep 2015 10:21:32 +0200 Subject: [PATCH 02/11] FIX : #3530 --- htdocs/fourn/facture/paiement.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index ba3f82c78e0..81fe1d6b345 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -5,11 +5,8 @@ * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin -<<<<<<< HEAD * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> -======= * Copyright (C) 2015 Marcos García ->>>>>>> refs/remotes/origin/3.6 * * 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 @@ -46,6 +43,7 @@ $confirm = GETPOST('confirm'); $facid=GETPOST('facid','int'); $socid=GETPOST('socid','int'); +$accountid = GETPOST('accountid'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -200,7 +198,7 @@ if (empty($reshook)) if (! $error) { - $result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$_POST['accountid'],'',''); + $result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$accountid,'',''); if ($result < 0) { setEventMessage($paiement->error, 'errors'); @@ -304,7 +302,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if (! empty($conf->banque->enabled)) { print ''.$langs->trans('Account').''; - $form->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',2); + $form->select_comptes(empty($accountid)?'':$accountid,'accountid',0,'',2); print ''; } else From cb31ab3e2b925a0feabdd511b78da063c7e22b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 16 Sep 2015 19:53:32 +0200 Subject: [PATCH 03/11] FIX Syntax error in Debian Apache configuration This issue prevented Apache from starting after dolibarr deb package installation with the following error: Syntax error on line 30 of /etc/apache2/conf.d/dolibarr.conf: order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure' --- build/debian/apache/dolibarr.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/debian/apache/dolibarr.conf b/build/debian/apache/dolibarr.conf index 95eaae21190..bdbb6e1b4c3 100644 --- a/build/debian/apache/dolibarr.conf +++ b/build/debian/apache/dolibarr.conf @@ -15,7 +15,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs # Require all granted # # -# Order allow, deny +# Order allow,deny # Allow from all # # @@ -27,7 +27,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs Require all granted - Order allow, deny + Order allow,deny Allow from all From 8dd843ab8f7e1947cabc359cf0ebcc41fde634c7 Mon Sep 17 00:00:00 2001 From: AlainRnet Date: Thu, 17 Sep 2015 23:23:18 +0200 Subject: [PATCH 04/11] Update categorie.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit voir https://github.com/Dolibarr/dolibarr/pull/3540/files (je n'avais pas vu dans quelle branche j'étais) --- htdocs/categories/categorie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 0746475ecec..9e780223d0e 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -410,7 +410,7 @@ else if ($id || $ref) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($member,'id'); + print $form->showrefnav($member,'id','','1','rowid','ref','','&type=3'); print ''; // Login From de04f3022c3150f905d75a855d20129f32add9c8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 20 Sep 2015 09:05:52 +0200 Subject: [PATCH 05/11] Fix: use get instead getJSON for avoid freezing --- htdocs/ecm/tpl/enablefiletreeajax.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php index b348cb03c72..7b2145d0f93 100644 --- a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php +++ b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php @@ -51,7 +51,7 @@ $(document).ready(function() { $('#refreshbutton').click( function() { $.pleaseBePatient("trans('PleaseBePatient'); ?>"); - $.getJSON( "", { + $.get( "", { action: "build", element: "ecm" }, From 75daddbbe290ae0262cee1506f2b46cf2d57e1e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Sep 2015 15:40:17 +0200 Subject: [PATCH 06/11] Update ignore to secure --- build/makepack-dolibarr.pl | 3 ++- htdocs/.gitignore | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 2b31d1f26a6..99ec7b3543a 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -467,6 +467,7 @@ if ($nboftargetok) { # Removed known external modules to avoid any error when packaging from env where external modules are tested $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`; @@ -481,8 +482,8 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; - # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; + # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`; diff --git a/htdocs/.gitignore b/htdocs/.gitignore index 0b4d7b82790..ddead79d7bd 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -13,3 +13,4 @@ /ultimatepdf* /lead /dolimed* +/allscreens* From c125ba0d6656d88323368183c3d8f6a6b972a726 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Sep 2015 15:40:17 +0200 Subject: [PATCH 07/11] Update ignore to secure Conflicts: htdocs/.gitignore --- build/makepack-dolibarr.pl | 3 ++- htdocs/.gitignore | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index a4dbb40ae7c..18e7092fc1b 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -457,6 +457,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`; # Removed known external modules to avoir any error when packaging on test env $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`; @@ -470,8 +471,8 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; - # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; + # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/test`; diff --git a/htdocs/.gitignore b/htdocs/.gitignore index 160eae6f858..4b12a493530 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -11,3 +11,6 @@ /teclib* /test.php /ultimatepdf* +/lead +/dolimed* +/allscreens* \ No newline at end of file From 90b78702e51a5b9311a755b9191168abc12fcc2a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Sep 2015 16:23:51 +0200 Subject: [PATCH 08/11] Update ignore to secure packaging --- htdocs/theme/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/.gitignore b/htdocs/theme/.gitignore index bad6db7e4d2..7da676f680b 100644 --- a/htdocs/theme/.gitignore +++ b/htdocs/theme/.gitignore @@ -1,2 +1,3 @@ /bootstrap /oblyon +/allscreens/ From f1ab0d36c5a98c493e8f159a29265c91131c54b8 Mon Sep 17 00:00:00 2001 From: tysauron Date: Tue, 22 Sep 2015 22:37:31 +0200 Subject: [PATCH 09/11] Chmod new file not old file --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 2f197d8b645..e49661be26f 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -627,7 +627,7 @@ function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1) else dol_syslog("files.lib.php::dol_move failed", LOG_WARNING); } if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK; - @chmod($newpathofsrcfile, octdec($newmask)); + @chmod($newpathofdestfile, octdec($newmask)); } return $result; From a70e73a963be33d0100b01bce011e44b17f5e7be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Sep 2015 01:08:23 +0200 Subject: [PATCH 10/11] FIX Missing validate button if permission are not valid. --- htdocs/comm/propal.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 504e5adb0b2..31603acc5a1 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2164,18 +2164,20 @@ if ($action == 'create') if ($action != 'statut' && $action != 'editline') { // Validate - if ($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0 && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->creer)) + if ($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0) + { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->propal_advance->validate))) - ) { - if (count($object->lines) > 0) + { print ''; - // else print ''.$langs->trans('Validate').''; + } + else + print ''; } // Create event if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. { - print '' . $langs->trans("AddAction") . ''; + print ''; } // Edit if ($object->statut == Propal::STATUS_VALIDATED && $user->rights->propal->creer) { From 12a08ae4e1f241cd79c7b49947c7a18e376e5e28 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Sep 2015 10:25:06 +0200 Subject: [PATCH 11/11] Prepare 3.8.1 --- build/makepack-howto.txt | 6 ++---- htdocs/filefunc.inc.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index 173c01c6f8b..813db9bb4b8 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -10,13 +10,12 @@ beta version of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z-w in htdocs/filefunc.inc.php -- Update version number with x.y.z-w in build/debian/changelog - Commit all changes. -- Add a Tag (x.y.z-beta) and push it: git push --tags -- Create a branch (x.y). - Run makepack-dolibarr.pl to generate all packages. +- Create a branch (x.y), if version seems stable enough. + - Move build files into www.dolibarr.org web site (/home/dolibarr/wwwroot/files/lastbuild). @@ -31,7 +30,6 @@ complete release of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z in htdocs/filefunc.inc.php -- Update version number with x.y.z in build/debian/changelog - Commit all changes. - Run makepack-dolibarr.pl to generate all packages. diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 1898b50e693..ea369d8aff3 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -30,7 +30,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.0'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.1'); if (! defined('EURO')) define('EURO',chr(128));