diff --git a/README.md b/README.md
index ac8f1d06382..139bdc00b6a 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ You can freely use, study, modify or distribute it according to its licence.
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
-Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
+Dolibarr has a large community ready to help you, free forums and [officially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)

@@ -45,7 +45,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
#### Generic install steps:
-- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions).
+- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
@@ -90,6 +90,7 @@ Dolibarr supports upgrading usually wihtout the need for any (commercial) suppor
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
+
## FEATURES
### Main application/modules (all optional)
@@ -162,8 +163,8 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### System Environment / Requirements
-- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
-- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
+- Works with PHP 5.6+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
+- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
### Extending
diff --git a/dev/resources/iso-normes/company_ids.txt b/dev/resources/iso-normes/company_ids.txt
new file mode 100644
index 00000000000..69c2af1d665
--- /dev/null
+++ b/dev/resources/iso-normes/company_ids.txt
@@ -0,0 +1,2 @@
+Spain https://incwell.eu/en/company-formation-spain/
+France https://www.economie.gouv.fr/entreprises/numeros-identification-entreprise
diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php
index b4f90f19675..e2142f4fee8 100644
--- a/htdocs/accountancy/admin/card.php
+++ b/htdocs/accountancy/admin/card.php
@@ -255,7 +255,7 @@ if ($action == 'create') {
print dol_get_fiche_end();
print '
';
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 7c3b368ae14..55ab524daec 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -7907,7 +7907,7 @@ abstract class CommonObject
}*/
}
- $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(',', $tmp).' WHERE rowid='.$this->id;
+ $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(', ', $tmp).' WHERE rowid='.$this->id;
$this->db->begin();
if (!$error)
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 0173e03730e..15cfa9e5771 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6259,7 +6259,7 @@ class Form
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
*
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
- * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>...))
+ * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...))
* @param string|string[] $id Preselected key or preselected keys for multiselect
* @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (key is -1 and value is '' or ' ' if 1, key is -1 and value is text if string), <0 to add an empty value with key that is this value.
* @param int $key_in_label 1 to show key into label with format "[key] value"
@@ -6331,10 +6331,14 @@ class Form
foreach ($array as $key => $tmpvalue)
{
- if (is_array($tmpvalue)) $value = $tmpvalue['label'];
- else $value = $tmpvalue;
-
- $disabled = ''; $style = '';
+ if (is_array($tmpvalue)) {
+ $value = $tmpvalue['label'];
+ $disabled = empty($tmpvalue['disabled']) ? '' : ' disabled';
+ $style = empty($tmpvalue['css']) ? ' class="'.$tmpvalue['css'].'"' : '';
+ } else {
+ $value = $tmpvalue;
+ $disabled = ''; $style = '';
+ }
if (!empty($disablebademail))
{
if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value))
@@ -7489,10 +7493,11 @@ class Form
* @param string $imagesize 'mini', 'small' or '' (original)
* @param int $addlinktofullsize Add link to fullsize image
* @param int $cache 1=Accept to use image in cache
- * @param string $forcecapture Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if empty.
+ * @param string $forcecapture '', 'user' or 'environment'. Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''.
+ * @param int $noexternsourceoverwrite No overwrite image with extern source (like 'gravatar' or other module)
* @return string HTML code to output photo
*/
- public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '')
+ public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '', $noexternsourceoverwrite = 0)
{
global $conf, $langs;
@@ -7569,18 +7574,15 @@ class Form
{
if ($file && file_exists($dir."/".$file))
{
- if ($addlinktofullsize)
- {
+ if ($addlinktofullsize) {
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity);
if ($urladvanced) $ret .= '';
else $ret .= '';
}
$ret .= '';
if ($addlinktofullsize) $ret .= '';
- } elseif ($altfile && file_exists($dir."/".$altfile))
- {
- if ($addlinktofullsize)
- {
+ } elseif ($altfile && file_exists($dir."/".$altfile)) {
+ if ($addlinktofullsize) {
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity);
if ($urladvanced) $ret .= '';
else $ret .= '';
@@ -7589,8 +7591,7 @@ class Form
if ($addlinktofullsize) $ret .= '';
} else {
$nophoto = '/public/theme/common/nophoto.png';
- if (in_array($modulepart, array('userphoto', 'contact', 'memberphoto'))) // For module that are "physical" users
- {
+ if (in_array($modulepart, array('userphoto', 'contact', 'memberphoto'))) { // For module that are "physical" users
if ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor') !== false) {
$nophoto = '/public/theme/common/company.png';
} else {
@@ -7600,11 +7601,8 @@ class Form
}
}
- if (!empty($conf->gravatar->enabled) && $email)
- {
- /**
- * @see https://gravatar.com/site/implement/images/php/
- */
+ if (!empty($conf->gravatar->enabled) && $email && empty($noexternsourceoverwrite)) {
+ // see https://gravatar.com/site/implement/images/php/
global $dolibarr_main_url_root;
$ret .= '';
//$defaultimg=urlencode(dol_buildpath($nophoto,3));
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 380b7a1ad17..f7a24c56c8e 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1362,7 +1362,7 @@ class FormFile
} else {
print '
';
@@ -3096,7 +3094,7 @@ function dol_substr($string, $start, $length, $stringencoding = '', $trunconbyte
*
* @param string $string String to truncate
* @param int $size Max string size visible (excluding ...). 0 for no limit. WARNING: Final string size can have 3 more chars (if we added ..., or if size was max+1 or max+2 or max+3 so it does not worse to replace with ...)
- * @param string $trunc Where to trunc: right, left, middle (size must be a 2 power), wrap
+ * @param string $trunc Where to trunc: 'right', 'left', 'middle' (size must be a 2 power), 'wrap'
* @param string $stringencoding Tell what is source string encoding
* @param int $nodot Truncation do not add ... after truncation. So it's an exact truncation.
* @param int $display Trunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS)
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 5e7ddbd38fc..f61ae5b7976 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -1625,7 +1625,7 @@ function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0)
{
if (empty($hidedetails) || $hidedetails > 1)
{
- $subprice = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice);
+ $subprice = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice);
$result .= price($sign * $subprice, 0, $outputlangs);
}
}
@@ -1966,7 +1966,7 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0)
}
elseif (empty($hidedetails) || $hidedetails > 1)
{
- $total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
+ $total_ht = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
if ($object->lines[$i]->situation_percent > 0)
{
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
@@ -2023,7 +2023,7 @@ function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0)
}
elseif (empty($hidedetails) || $hidedetails > 1)
{
- $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc);
+ $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc);
if ($object->lines[$i]->situation_percent > 0)
{
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 0f0b2474d51..fe9ae98ec61 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -678,10 +678,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print $hookmanager->resPrint;
// Tick to drag and drop
- if ($addordertick)
- {
- print '