diff --git a/ChangeLog b/ChangeLog
index 19ab1e0f49b..410e49eaf4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,8 +21,100 @@ Following changes may create regressions for some external modules, but were nec
* Removed method fetch_prods() and get_each_prod() not used, keep only get_arbo_each_prod() that is better.
* The hook contaxt commcard has been renamed thirdpartycomm
* The hook contaxt thirdpartycard has been renamed thirdpartycontact
+* Remove method Categorie:get_nb_categories() that was not used.
+
+***** ChangeLog for 7.0.2 compared to 7.0.1 *****
+FIX: #8023
+FIX: #8259 can't update contact birthday with REST API
+FIX: #8359
+FIX: #8389
+FIX: #8478 !empty instead of count to avoid warning
+FIX: #8488
+FIX: #8559 Bug to generate cheque receipt
+FIX: #8571
+FIX: #8574
+FIX: #8580
+FIX: #8650
+FIX: actioncomm export: type filtering not working
+FIX: Add a test to avoid to reset binding by error.
+FIX: addline on invoice supplier manage rank on its own if not provided
+FIX: Add warning when expense report line not into range
+FIX: avoid Error: Call to undefined method mysqli::get_charset()
+FIX: avoid focus problem when select2 is in a modal dialog window
+FIX: Binding pages must start on fiscal month not calendar month
+FIX: button "Classify bill" on supplier order was not visible
+FIX: Button receive products not visible
+FIX: can bypass the CSRF protection with url with domain inside
+FIX: Can't edit option PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY
+FIX: commonobject: don't require notnull field if default set
+FIX: CommonObject: don't require 'notnull' field if 'default' set
+FIX: cron script disabled if module disabled
+FIX: CVE-2018-10092
+FIX: CVE-2018-10094
+FIX: CVE-2018-10095
+FIX: CVE-2018-9019
+FIX: CWE-89
+FIX: Data on income/expense report was always 0
+FIX: default addupdatedelete actions: uniformize add/update value checks
+FIX: default currency not set on supplier order creation from commercial menu #8459
+FIX: delete all product variants of a parent product
+FIX: Detail per account not visible when total < 0
+FIX: DOL_AUTOSET_COOKIE was not correctly setting value of cookie
+FIX: don't print empty date in CommonObject::showOutputField
+FIX: dont print empty date in CommonObject::showOutputField
+FIX: Draft invoice must be excluded from report
+FIX: environment shown on cron card
+FIX: Error in ContractLigne not return to Contract
+FIX: extrafields price and double were lost during a failed post.
+FIX: File name not visible in email preview
+FIX: filter/sorting on extrafield on contact list from contact tab
+FIX: Initial month on report income/expense per predefined group
+FIX: issue #8037
+FIX: Issue #8455
+FIX: issue #8470
+FIX: label in getnomurl projectlist
+FIX: limit access of email template page to internal users
+FIX: look and feel v7 "back to" for bookkeeping record
+FIX: Max nb of generation of recurring invoice should not show warning
+FIX: missing english name for object
+FIX: Missing include
+FIX: missing User object with API REST
+FIX: modulebuilder: could not create html fields
+FIX: modulebuilder: handle 'price' fieldtype
+FIX: multiple creation of same event
+FIX: Name of user not visible on journalizing expense report payments
+FIX: Not approved holidays must not be visible into timesheet
+FIX: Only approved expense report must be journalized
+FIX: payment term doc-specific label was not used
+FIX: payment term doc-specific label was not used (issue #8414)
+FIX: project category is type 6 not 5
+FIX: Projet is not prefilled when created from overwiew page
+FIX: Related contact printed in societe agenda
+FIX: Removed error when no error on accounting setup page
+FIX: remove var_dump
+FIX: sanitize setup params
+FIX: selectForFormsList: entity checked even is object not multi-entity managed
+FIX: service creation, right is tested regarding the product type
+FIX: some localtaxes errors
+FIX: Some report have data when several chart of accounts exists
+FIX: sql error using no category
+FIX: SQL Injection CWE-89
+FIX: Support or multicompany for sheduled jobs
+FIX: Test on mandatory status when closing proposal failed
+FIX: to allow IRPF not null even if main VAT is null.
+FIX: update wrong datetime extrafield
+FIX: Use priority to define order of sheduled jobs
+FIX: various modulebuilder-related issues
+FIX: view of balance before field
+FIX: weird password autocompletion in Goocle Chrome (issue #8479)
+FIX: weird password autocompletion in Google Chrome (issue #8479)
+FIX: When clearing filter, we must not save tmp criterias in session
+FIX: With x extrafields, request for multicompany label was done x times
+FIX: several XSS
+FIX: zip not filtered
+
***** ChangeLog for 7.0.1 compared to 7.0.0 *****
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
FIX: #8200
@@ -378,7 +470,22 @@ Following changes may create regressions for some external modules, but were nec
-***** ChangeLog for 6.0.6 compared to 6.0.6 *****
+***** ChangeLog for 6.0.7 compared to 6.0.6 *****
+FIX: #8023
+FIX: #8259 can't update contact birthday with REST API
+FIX: #8478 !empty instead of count to avoid warning
+FIX: #8488
+FIX: actioncomm export: type filtering not working
+FIX: addline on invoice supplier manage rank on its own if not provided
+FIX: issue #8037
+FIX: label in getnomurl projectlist
+FIX: payment term doc-specific label was not used
+FIX: payment term doc-specific label was not used (issue #8414)
+FIX: project category is type 6 not 5 !!
+FIX: some localtaxes errors
+FIX: weird password autocompletion in Google Chrome (issue #8479)
+
+***** ChangeLog for 6.0.6 compared to 6.0.5 *****
FIX: #7974 Contract - Invalid reference on the document
FIX: #8139
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php
index 5f54c95d7e0..93ee76e3359 100755
--- a/build/generate_filelist_xml.php
+++ b/build/generate_filelist_xml.php
@@ -45,7 +45,7 @@ $includeconstants=array();
if (empty($argv[1]))
{
- print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
+ print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1;
}
@@ -68,30 +68,52 @@ while ($i < $argc)
$i++;
}
+if (empty($release))
+{
+ print "Error: Missing release paramater\n";
+ print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
+ exit -1;
+}
+
+$savrelease = $release;
+
// If release is auto, we take current version
$tmpver=explode('-', $release, 2);
-if ($tmpver[0] == 'auto')
+if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable')
{
$release=DOL_VERSION;
- if ($tmpver[1]) $release.='-'.$tmpver[1];
+ if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
}
if (empty($includecustom))
{
- $tmpver=explode('-', $release, 2);
- if (DOL_VERSION != $tmpver[0])
- {
- print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n";
- print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
- exit -1;
- }
+ $tmpverbis=explode('-', $release, 2);
+ if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable')
+ {
+ if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto')
+ {
+ print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
+ print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
+ exit -1;
+ }
+ }
+ else
+ {
+ $tmpverter=explode('-', DOL_VERSION, 2);
+ if ($tmpverter[0] != $tmpverbis[0])
+ {
+ print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
+ print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
+ exit -1;
+ }
+ }
}
else
{
if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release))
{
- print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n";
- print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
+ print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
+ print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
}
}
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 77d78da1dc5..1ab3269d0de 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -466,10 +466,12 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.deb`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.dsc`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.gz`;
+ $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.xz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.deb`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.rpm`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.gz`;
+ $ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.xz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tgz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.xz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.zip`;
@@ -849,6 +851,8 @@ if ($nboftargetok) {
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
print "Remove target ${FILENAMEDEB}.debian.tar.gz...\n";
unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.gz");
+ print "Remove target ${FILENAMEDEB}.debian.tar.xz...\n";
+ unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.xz");
print "Remove target ${FILENAMEDEBNATIVE}.orig.tar.gz...\n";
unlink("$NEWDESTI/${FILENAMEDEBNATIVE}.orig.tar.gz");
@@ -1024,7 +1028,7 @@ if ($nboftargetok) {
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
- $ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
+ $ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
next;
}
@@ -1168,7 +1172,7 @@ if ($nboftargetok) {
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF
- "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF
+ "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
@@ -1181,8 +1185,7 @@ if ($nboftargetok) {
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
- "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
- "$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
+ "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php
index 690e9fad1f1..b831a242bbf 100644
--- a/htdocs/accountancy/admin/account.php
+++ b/htdocs/accountancy/admin/account.php
@@ -170,9 +170,9 @@ $pcgver = $conf->global->CHARTOFACCOUNTS;
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active, ";
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
-if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent";
-else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent";
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = " . $conf->entity;
+if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity;
+else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity;
$sql .= " WHERE asy.rowid = " . $pcgver;
//print $sql;
if (strlen(trim($search_account))) $sql .= natural_search("aa.account_number", $search_account);
diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php
index 925dcc0dc4e..f43eb6c7444 100644
--- a/htdocs/accountancy/admin/journals_list.php
+++ b/htdocs/accountancy/admin/journals_list.php
@@ -84,7 +84,7 @@ $tablib[35]= "DictionaryAccountancyJournal";
// Requests to extract data
$tabsql=array();
-$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a";
+$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a WHERE a.entity=".$conf->entity;
// Criteria to sort dictionaries
$tabsqlsort=array();
@@ -100,7 +100,7 @@ $tabfieldvalue[35]= "code,label,nature";
// Nom des champs dans la table pour insertion d'un enregistrement
$tabfieldinsert=array();
-$tabfieldinsert[35]= "code,label,nature";
+$tabfieldinsert[35]= "code,label,nature,entity";
// Nom du rowid si le champ n'est pas de type autoincrement
// Example: "" if id field is "rowid" and has autoincrement on
diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php
index fac49dcfcde..76b69073f25 100644
--- a/htdocs/admin/agenda_reminder.php
+++ b/htdocs/admin/agenda_reminder.php
@@ -29,9 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
if (!$user->admin)
accessforbidden();
-$langs->load("admin");
-$langs->load("other");
-$langs->load("agenda");
+$langs->loadLangs(array("admin","other","agenda"));
$action = GETPOST('action','alpha');
$value = GETPOST('value','alpha');
@@ -173,8 +171,6 @@ llxHeader();
$linkback=''.$langs->trans("BackToModuleList").'';
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
-print " \n";
-
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 442a85c9c6a..311398a78e1 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -6,7 +6,7 @@
* Copyright (C) 2004 Eric Seigne
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2011-2012 Juanjo Menent
- * Copyright (C) 2011-2015 Philippe Grand
+ * Copyright (C) 2011-2018 Philippe Grand
*
* 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
@@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
-$langs->load("admin");
-$langs->load("sendings");
-$langs->load("deliveries");
-$langs->load('other');
+// Load traductions files requiredby by page
+$langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
if (! $user->admin)
accessforbidden();
diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php
index 4c18069b415..0af26a0a2b7 100644
--- a/htdocs/admin/livraison.php
+++ b/htdocs/admin/livraison.php
@@ -6,8 +6,8 @@
* Copyright (C) 2004 Eric Seigne
* Copyright (C) 2005-2014 Regis Houssin
* Copyright (C) 2011-2013 Juanjo Menent
- * Copyright (C) 2011-2015 Philippe Grand
- * Copyright (C) 2015 Claudio Aschieri
+ * Copyright (C) 2011-2018 Philippe Grand
+ * Copyright (C) 2015 Claudio Aschieri
*
* 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
@@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
require_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
-$langs->load("admin");
-$langs->load("sendings");
-$langs->load("deliveries");
-$langs->load('other');
+// Load traductions files requiredby by page
+$langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
if (!$user->admin) accessforbidden();
@@ -216,7 +214,6 @@ foreach ($dirmodels as $reldir)
$handle = opendir($dir);
if (is_resource($handle))
{
- $var=true;
while (($file = readdir($handle))!==false)
{
if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php')
@@ -337,7 +334,6 @@ print "\n";
clearstatcache();
-$var=true;
foreach ($dirmodels as $reldir)
{
$dir = dol_buildpath($reldir."core/modules/livraison/doc/");
@@ -452,7 +448,6 @@ print '