Skip to content

Commit

Permalink
Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 28, 2024
2 parents 754ffee + 58dd283 commit 324636f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions htdocs/compta/bank/various_payment/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
if (isModEnabled('project')) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
}

// Load translation files required by the page
$langs->loadLangs(array("compta", "banks", "bills", "accountancy"));
Expand Down Expand Up @@ -242,7 +244,7 @@
if ($arrayfields['bank']['checked']) {
$accountstatic = new Account($db);
}
if ($arrayfields['project']['checked']) {
if (isModEnabled('project') && $arrayfields['project']['checked']) {
$proj = new Project($db);
}
if ($arrayfields['entry']['checked']) {
Expand Down Expand Up @@ -538,7 +540,7 @@
}

// Project
if ($arrayfields['project']['checked']) {
if (isModEnabled('project') && $arrayfields['project']['checked']) {
print '<td class="liste_titre">';
// TODO
print '</td>';
Expand Down Expand Up @@ -635,7 +637,7 @@
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
if ($arrayfields['project']['checked']) {
if (isModEnabled('project') && $arrayfields['project']['checked']) {
print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
Expand Down Expand Up @@ -702,7 +704,7 @@
$variousstatic->amount = $obj->amount;

$accountingaccount->fetch('', $obj->accountancy_code, 1);
$variousstatic->accountancy_code = $accountingaccount->getNomUrl(0, 0, 1, $obj->accountingaccount, 1);
$variousstatic->accountancy_code = $accountingaccount->getNomUrl(0, 0, 1, $obj->accountancy_code, 1);

if ($mode == 'kanban') {
if ($i == 0) {
Expand Down Expand Up @@ -780,7 +782,7 @@
}

// Project
if ($arrayfields['project']['checked']) {
if (isModEnabled('project') && $arrayfields['project']['checked']) {
print '<td class="nowraponall">';
if ($obj->fk_project > 0) {
$proj->fetch($obj->fk_project);
Expand Down
2 changes: 2 additions & 0 deletions htdocs/core/class/doleditor.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $
$found = 0;
$out = '';

$this->content = ($this->content ?? ''); // to avoid htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated

if (in_array($this->tool, array('textarea', 'ckeditor'))) {
$found = 1;
//$out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" '.($this->readonly?' disabled':'').' rows="'.$this->rows.'"'.(preg_match('/%/',$this->cols)?' style="margin-top: 5px; width: '.$this->cols.'"':' cols="'.$this->cols.'"').' class="flat">';
Expand Down

0 comments on commit 324636f

Please sign in to comment.