Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-01-10 15:34:46 +01:00
commit e202ed3d68
8 changed files with 31 additions and 16 deletions

View file

@ -1595,8 +1595,9 @@ class ExtraFields
$element = $extrafieldsobjectkey; // $extrafieldsobjectkey comes from $object->table_element but we need $object->element
if ($element == 'socpeople') {
$element = 'contact';
} else if ( $element == 'projet' ) {
$element = 'project';
}
//$out = $form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, 0, '');
$out = $form->selectForForms($tmparray[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, 0, '', $element.':options_'.$key);
} elseif ($type == 'password') {

View file

@ -4,7 +4,7 @@
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2023 Lenin Rivas <lenin.rivas777@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@ -2233,7 +2233,7 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz", &$errorstring
// Create recursive directory iterator
/** @var SplFileInfo[] $files */
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($rootPath),
new RecursiveDirectoryIterator($rootPath, FilesystemIterator::UNIX_PATHS),
RecursiveIteratorIterator::LEAVES_ONLY
);
@ -2496,7 +2496,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles =
// This does not return symbolic links
/** @var SplFileInfo[] $files */
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($inputdir),
new RecursiveDirectoryIterator($inputdir, FilesystemIterator::UNIX_PATHS),
RecursiveIteratorIterator::LEAVES_ONLY
);

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
*
@ -588,11 +588,11 @@ function project_admin_prepare_head()
* @param string $var Color
* @param int $showproject Show project columns
* @param int $taskrole Array of roles of user for each tasks
* @param int $projectsListId List of id of project allowed to user (string separated with comma)
* @param string $projectsListId List of id of project allowed to user (string separated with comma)
* @param int $addordertick Add a tick to move task
* @param int $projectidfortotallink 0 or Id of project to use on total line (link to see all time consumed for project)
* @param string $dummy Not used.
* @param string $showbilltime Add the column 'TimeToBill' and 'TimeBilled'
* @param int $showbilltime Add the column 'TimeToBill' and 'TimeBilled'
* @param array $arrayfields Array with displayed coloumn information
* @param array $arrayofselected Array with selected fields
* @return int Nb of tasks shown

View file

@ -89,8 +89,10 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
/**
* Constructor
*
* @param DoliDB $db Database object
*/
public function __construct()
public function __construct($db)
{
$this->code_null = 0;
$this->code_modifiable = 1;

View file

@ -65,8 +65,10 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
/**
* Constructor
*
* @param DoliDB $db Database object
*/
public function __construct()
public function __construct($db)
{
$this->code_null = 1;
$this->code_modifiable = 1;

View file

@ -65,8 +65,10 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
/**
* Constructor
*
* @param DoliDB $db Database object
*/
public function __construct()
public function __construct($db)
{
$this->code_null = 1;
$this->code_modifiable = 1;

View file

@ -59,6 +59,14 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
*/
abstract class ModeleThirdPartyCode extends CommonNumRefGenerator
{
/**
* Constructor
*
* @param DoliDB $db Database object
*/
abstract public function __construct($db);
/**
* @var int Automatic numbering
*/

View file

@ -3362,7 +3362,7 @@ class Societe extends CommonObject
break;
}
}
$mod = new $module();
$mod = new $module($this->db);
$this->code_client = $mod->getNextValue($objsoc, $type);
$this->prefixCustomerIsRequired = $mod->prefixIsRequired;
@ -3394,7 +3394,7 @@ class Societe extends CommonObject
break;
}
}
$mod = new $module();
$mod = new $module($this->db);
$this->code_fournisseur = $mod->getNextValue($objsoc, $type);
@ -3424,7 +3424,7 @@ class Societe extends CommonObject
}
}
$mod = new $module();
$mod = new $module($this->db);
dol_syslog(get_class($this)."::codeclient_modifiable code_client=".$this->code_client." module=".$module);
if ($mod->code_modifiable_null && !$this->code_client) {
@ -3464,7 +3464,7 @@ class Societe extends CommonObject
}
}
$mod = new $module();
$mod = new $module($this->db);
dol_syslog(get_class($this)."::codefournisseur_modifiable code_founisseur=".$this->code_fournisseur." module=".$module);
if ($mod->code_modifiable_null && !$this->code_fournisseur) {
@ -3510,7 +3510,7 @@ class Societe extends CommonObject
}
}
$mod = new $module();
$mod = new $module($this->db);
dol_syslog(get_class($this)."::check_codeclient code_client=".$this->code_client." module=".$module);
$result = $mod->verif($this->db, $this->code_client, $this, 0);
@ -3551,7 +3551,7 @@ class Societe extends CommonObject
}
}
$mod = new $module();
$mod = new $module($this->db);
dol_syslog(get_class($this)."::check_codefournisseur code_fournisseur=".$this->code_fournisseur." module=".$module);
$result = $mod->verif($this->db, $this->code_fournisseur, $this, 1);