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

This commit is contained in:
Laurent Destailleur 2024-01-11 13:41:50 +01:00
commit 34c2ca539a
10 changed files with 31 additions and 16 deletions

View file

@ -73,6 +73,20 @@ NUSOAP:
TCPDF:
------
* Modify in tcpdf.php: make TCPDF::_out public.
(htdocs/core/lib/pdf.lib.php uses it as a public method)
Change:
protected function _out($s)
to
public function _out($s)
Change in method's _out phpdoc:
* @protected
to
* @public
* Replace in tcpdf.php:
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {

View file

@ -1978,13 +1978,13 @@ if ($action == 'create' && $usercancreate) {
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), !empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms, 1).'</label></td>';
print '<td class="maxwidthonsmartphone">';
$incoterm_id = GETPOST('incoterm_id');
$incoterm_location = GETPOST('location_incoterms');
$location_incoterms = GETPOST('location_incoterms');
if (empty($incoterm_id)) {
$incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms);
$incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
$location_incoterms = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
}
print img_picto('', 'incoterm', 'class="pictofixedwidth"');
print $form->select_incoterms($incoterm_id, $incoterm_location);
print $form->select_incoterms($incoterm_id, $location_incoterms);
print '</td></tr>';
}

View file

@ -189,10 +189,10 @@ if ($action == 'add' && $user->hasRight('banque', 'transfer')) {
$error++;
}
if (!$error) {
$mesgs = $langs->trans("TransferFromToDone", '{s1}', '{s2}', $amount[$n], $langs->transnoentitiesnoconv("Currency".$conf->currency));
$mesgs = str_replace('{s1}', '<a href="bankentries_list.php?id='.$tmpaccountfrom->id.'&sortfield=b.datev,b.dateo,b.rowid&sortorder=desc">'.$tmpaccountfrom->label.'</a>', $mesgs);
$mesgs = str_replace('{s2}', '<a href="bankentries_list.php?id='.$tmpaccountto->id.'">'.$tmpaccountto->label.'</a>', $mesgs);
setEventMessages($mesgs, null, 'mesgs');
$mesg = $langs->trans("TransferFromToDone", '{s1}', '{s2}', $amount[$n], $langs->transnoentitiesnoconv("Currency".$conf->currency));
$mesg = str_replace('{s1}', '<a href="bankentries_list.php?id='.$tmpaccountfrom->id.'&sortfield=b.datev,b.dateo,b.rowid&sortorder=desc">'.$tmpaccountfrom->label.'</a>', $mesgs);
$mesg = str_replace('{s2}', '<a href="bankentries_list.php?id='.$tmpaccountto->id.'">'.$tmpaccountto->label.'</a>', $mesgs);
setEventMessages($mesg, null, 'mesgs');
} else {
$error++;
setEventMessages($tmpaccountfrom->error.' '.$tmpaccountto->error, null, 'errors');

View file

@ -1006,7 +1006,7 @@ if ($action == 'create') {
// Invoice subtype
if (getDolGlobalInt('INVOICE_SUBTYPE_ENABLED')) {
print "<tr><td>".$langs->trans("InvoiceSubtype")."</td><td>";
print $form->getSelectInvoiceSubtype(GETPOSTISSET('subtype') ? GETPOST('subtype') : $object->subtype, 'subtype', -1, 0, 0, '');
print $form->getSelectInvoiceSubtype(GETPOSTISSET('subtype') ? GETPOST('subtype') : $object->subtype, 'subtype', 0, 0, '');
print "</td></tr>";
}

View file

@ -440,9 +440,9 @@ class FormMail extends Form
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) {
if (!empty($arraydefaultmessage->joinfiles) && !empty($this->param['fileinit']) && is_array($this->param['fileinit'])) {
foreach ($this->param['fileinit'] as $file) {
if (!empty($file)) {
$this->add_attached_files($file, basename($file), dol_mimetype($file));
foreach ($this->param['fileinit'] as $path) {
if (!empty($path)) {
$this->add_attached_files($path);
}
}
}

View file

@ -292,7 +292,7 @@ function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $s
}
// Sort the data
if ($sortorder) {
array_multisort($myarray, $sortorder, $file_list);
array_multisort($myarray, $sortorder, SORT_REGULAR, $file_list);
}
}

View file

@ -537,7 +537,7 @@ class Fichinter extends CommonObject
dol_syslog(get_class($this)."::setDraft", LOG_DEBUG);
$this->oldcopy = dol_clone($this);
$this->oldcopy = dol_clone($this, 2);
$this->db->begin();

View file

@ -10516,9 +10516,9 @@ class TCPDF
/**
* Output a string to the document.
* @param $s (string) string to output.
* @protected
* @public
*/
protected function _out($s)
public function _out($s)
{
if ($this->state == 2) {
if ($this->inxobj) {

View file

@ -280,6 +280,7 @@ if ($dirins && $action == 'initmodule' && $modulename) {
}
// Delete dir and files that can be generated in sub tabs later if we need them (we want a minimal module first)
dol_delete_dir_recursive($destdir.'/ajax');
dol_delete_dir_recursive($destdir.'/build/doxygen');
dol_delete_dir_recursive($destdir.'/core/modules/mailings');
dol_delete_dir_recursive($destdir.'/core/modules/'.strtolower($modulename));
@ -311,7 +312,7 @@ if ($dirins && $action == 'initmodule' && $modulename) {
dol_delete_file($destdir.'/myobject_agenda.php');
dol_delete_file($destdir.'/myobject_list.php');
dol_delete_file($destdir.'/lib/'.strtolower($modulename).'_myobject.lib.php');
dol_delete_file($destdir.'/test/phpunit/functionnal/'.$modulename.'FunctionnalTest.php');
dol_delete_file($destdir.'/test/phpunit/functional/'.$modulename.'FunctionalTest.php');
dol_delete_file($destdir.'/test/phpunit/MyObjectTest.php');
dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.sql');
dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.sql');