diff --git a/.travis.yml b/.travis.yml
index 718356e8075..1a6cae1e792 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,6 +12,7 @@ php:
- '5.5'
- '5.6'
- '7.0'
+- '7.1'
- nightly
addons:
@@ -96,7 +97,7 @@ install:
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
composer -n require phpunit/phpunit ^4
fi
- if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
+ if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
composer -n require phpunit/phpunit ^5
fi
echo
@@ -136,7 +137,7 @@ before_script:
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
echo
echo "Enabling Memcached for PHP <= 5.4"
- # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!
+ # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1 and nightly!
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
fi
phpenv rehash
@@ -208,7 +209,7 @@ before_script:
echo "Setting up Apache + FPM"
# enable php-fpm
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
- if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
+ if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
# Copy the included pool
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
fi
diff --git a/ChangeLog b/ChangeLog
index dd2fc646f7f..798f3ef91f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -403,6 +403,115 @@ So if you included it into your module, change your code like this to be compati
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
+
+***** ChangeLog for 3.9.4 compared to 3.9.3 *****
+FIX: #2853
+FIX: #3128
+FIX: #4447
+FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
+FIX: #5340
+FIX: #5473
+FIX: #5474 Country_id of "Don" object is still empty
+FIX: #5534
+FIX: #5535 bad dependency.
+FIX: #5537 AJAX project search does not work properly
+FIX: #5540 getFormMail is not registered as addReplace hook
+FIX: #5544 Disabled Contact still appear in lists to send emails
+FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
+FIX: #5568
+FIX: #5594
+FIX: #5629 PgSQL Interger string stylish error
+FIX: #5651
+FIX: #5660
+FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
+FIX: #5907
+FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
+FIX: #6051
+FIX: #6088
+FIX: Can correct stock of lot using eatby or sell by date
+FIX: Can make a movement on "out of sell" products
+FIX: cannot update bank account on invoice if module order not activated
+FIX: Can't create withdrawal document
+FIX: delete contract extrafields on contract deletion
+FIX: Direction of movement lost if an error occurs
+FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
+FIX: export extrafields must not include separe type
+FIX: External user must not be able to edit its discounts
+FIX: Failed to export contact categories with contact extra fields
+FIX: header title in commercial area
+FIX: HT and TTC price should always be displayed together
+FIX: incoterms
+FIX: incoterms do not output into crabe invoice PDF
+FIX: in PgSQL no quote "word style" is permitted around column name
+FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
+FIX: margin tab on customer card must filter on current entity invoices
+FIX: missing column into SQL on thridparty list
+FIX: only show projects of related third if external user
+FIX: PgSQL Module Ressource list crash #5637
+FIX: php Strict
+FIX: Regression when deleting product
+FIX: Security to restrict email sending was not efficient
+FIX: tag for date rfc in odt substitution
+FIX: Update intervention lline crash with PgSQL
+FIX: update limit stock on product stock
+FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
+FIX: wrong test on dict.php
+
+
+***** ChangeLog for 3.9.4 compared to 3.9.3 *****
+FIX: #2853
+FIX: #3128
+FIX: #4447
+FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
+FIX: #5340
+FIX: #5473
+FIX: #5474 Country_id of "Don" object is still empty
+FIX: #5534
+FIX: #5535 bad dependency.
+FIX: #5537 AJAX project search does not work properly
+FIX: #5540 getFormMail is not registered as addReplace hook
+FIX: #5544 Disabled Contact still appear in lists to send emails
+FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
+FIX: #5568
+FIX: #5594
+FIX: #5629 PgSQL Interger string stylish error
+FIX: #5651
+FIX: #5660
+FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
+FIX: #5907
+FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
+FIX: #6051
+FIX: #6088
+FIX: Can correct stock of lot using eatby or sell by date
+FIX: Can make a movement on "out of sell" products
+FIX: cannot update bank account on invoice if module order not activated
+FIX: Can't create withdrawal document
+FIX: delete contract extrafields on contract deletion
+FIX: Direction of movement lost if an error occurs
+FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
+FIX: export extrafields must not include separe type
+FIX: External user must not be able to edit its discounts
+FIX: Failed to export contact categories with contact extra fields
+FIX: header title in commercial area
+FIX: HT and TTC price should always be displayed together
+FIX: incoterms
+FIX: incoterms do not output into crabe invoice PDF
+FIX: in PgSQL no quote "word style" is permitted around column name
+FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
+FIX: margin tab on customer card must filter on current entity invoices
+FIX: missing column into SQL on thridparty list
+FIX: only show projects of related third if external user
+FIX: PgSQL Module Ressource list crash #5637
+FIX: php Strict
+FIX: Regression when deleting product
+FIX: Security to restrict email sending was not efficient
+FIX: tag for date rfc in odt substitution
+FIX: Update intervention lline crash with PgSQL
+FIX: update limit stock on product stock
+FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
+FIX: wrong test on dict.php
+
+
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
FIX: #4383 $userid not defined
FIX: #4448 $filebonprev is not used, $this->filename now
diff --git a/build/debian/README.howto b/build/debian/README.howto
index 1b64380cc26..afc2d391e1e 100644
--- a/build/debian/README.howto
+++ b/build/debian/README.howto
@@ -320,8 +320,8 @@ x.y.z+dfsgw
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
* Update/fix debian/* files used to build package.
-At least, add an entry into debian/changelog
-> dch -v x.y.z+dfsgw-v "My comment" will add entry.
+At least, add an entry into debian/changelog with command
+> dch -v x.y.z+dfsgw-1 "My comment"
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increased for each new import)
Then check/modify changelog to replace "version" or "unstable" with "UNRELEASED".
Then check/modify also the user/date signature:
@@ -332,7 +332,9 @@ Then check/modify also the user/date signature:
To update dolibarr debian package when only files into debian has changed:
* Change files and commit.
-* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...)
+* Add a line into changelog for version debian/x.y.z+dfsgw-v (increase the last v into 2, 3...)
+> dch -v x.y.z+dfsgw-v "My comment"
+* git tag will be added when package is pushed.
To update dolibarr debian package when only files not into debian has changed:
diff --git a/build/debian/control b/build/debian/control
index 37689ef9bcc..75ffb43b2c0 100755
--- a/build/debian/control
+++ b/build/debian/control
@@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
# Misc dependencies
# fonts-dejavu-core | ttf-dejavu-core,
xdg-utils,
- virtual-mysql-client,
+ mariadb-client | virtual-mysql-client,
${misc:Depends},
${perl:Depends}
Recommends: apache2 | lighttpd | httpd,
- virtual-mysql-server
+ mariadb-server | virtual-mysql-server
Suggests: www-browser, php5-geoip
Description: Web based software to manage a company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software package for
diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh
index 497d3abbf50..c34d9e2ffda 100755
--- a/dev/initdemo/initdemo.sh
+++ b/dev/initdemo/initdemo.sh
@@ -162,7 +162,7 @@ export res=$?
# ---------------------------- copy demo files
-export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
+export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
if [ "x$documentdir" != "x" ]
then
echo cp -pr $mydir/documents_demo/* "$documentdir/"
@@ -174,7 +174,7 @@ then
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
else
- echo Detection of documents directory failed so demo files were not copied.
+ echo Detection of documents directory $documentdir failed so demo files were not copied.
fi
diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php
index 62ad1188759..d9e30b23501 100755
--- a/dev/skeletons/build_class_from_table.php
+++ b/dev/skeletons/build_class_from_table.php
@@ -303,7 +303,7 @@ foreach($property as $key => $prop)
$varprop.="\$this->db->escape(\$this->".$prop['field'].")";
$varprop.=".\"'\")";
}
- elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
+ elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_m' || $prop['field']=='fk_user_author')
{
$varprop.="'.\$user->id";
}
@@ -367,7 +367,7 @@ foreach($property as $key => $prop)
$varprop.=')."\'" : \'null\')';
}
- elseif ($prop['field']=='fk_user_mod') {
+ elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_m') {
$varprop.="'.\$user->id";
}
else
diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php
index 4f725fa2dbe..01b48c35f75 100644
--- a/dev/skeletons/skeleton_class.class.php
+++ b/dev/skeletons/skeleton_class.class.php
@@ -188,11 +188,13 @@ class Skeleton_Class extends CommonObject
// Retrieve all extrafields for invoice
// fetch optionals attributes and labels
+ /*
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields=new ExtraFields($this->db);
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
$this->fetch_optionals($this->id,$extralabels);
-
+ */
+
// $this->fetch_lines();
$this->db->free($resql);
@@ -251,23 +253,19 @@ class Skeleton_Class extends CommonObject
$sql .= $this->db->order($sortfield,$sortorder);
}
if (!empty($limit)) {
- $sql .= ' ' . $this->db->plimit($limit + 1, $offset);
+ $sql .= ' ' . $this->db->plimit($limit, $offset);
}
- $this->lines = array();
-
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
while ($obj = $this->db->fetch_object($resql)) {
- $line = new Skeleton_ClassLine();
+ $line = new self($this->db);
$line->id = $obj->rowid;
$line->prop1 = $obj->field1;
$line->prop2 = $obj->field2;
-
- $this->lines[$line->id] = $line;
//...
}
$this->db->free($resql);
diff --git a/dev/tools/github_authors_peryear.sh b/dev/tools/github_authors_peryear.sh
new file mode 100755
index 00000000000..99b28d4d417
--- /dev/null
+++ b/dev/tools/github_authors_peryear.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+FROM=2016-01-01
+TO=2016-12-31
+
+echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
+git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
+
diff --git a/dev/tools/github_commits_perversion.sh b/dev/tools/github_commits_perversion.sh
new file mode 100755
index 00000000000..40ddafee617
--- /dev/null
+++ b/dev/tools/github_commits_perversion.sh
@@ -0,0 +1,15 @@
+#/bin/bash
+Releases=("3.8" "3.9" "4.0" "5.0", "develop")
+Dates=("2010-01-01", "2011-01-01", "2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01")
+let "counter = 1"
+
+for i in "${Releases[@]}"
+do
+ git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
+ echo -n "Total $i: "
+ git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
+ echo "======================="
+ echo
+ let "counter +=1"
+done
+
diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index d4b5407c912..ba2643a04b8 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -888,18 +888,18 @@ if ($id)
{
if ($value == 'country')
{
- print '
';
+if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
+{
+ print ' ';
+ print ' ';
+
+ print_fiche_titre($langs->trans("OtherInfo"), '', '');
+
+ print " \n";
+ print '
';
+if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
+{
+ print ' ';
+ print ' ';
+
+ print_fiche_titre($langs->trans("OtherInfo"), '', '');
+
+ print " \n";
+ print '