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

This commit is contained in:
Laurent Destailleur 2021-06-04 11:53:21 +02:00
commit ca1da3c83c
4 changed files with 14 additions and 14 deletions

View File

@ -589,9 +589,9 @@ if ($object->id > 0) {
print '</tr></table>'; print '</tr></table>';
print '</td><td>'; print '</td><td>';
if ($action == 'edittransportmode') { if ($action == 'edittransportmode') {
$form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->transport_mode_id, 'transport_mode_id', 1); $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, (!empty($object->transport_mode_id) ? $object->transport_mode_id : ''), 'transport_mode_id', 1);
} else { } else {
$form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->transport_mode_id, 'none'); $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, (!empty($object->transport_mode_id) ? $object->transport_mode_id : ''), 'none');
} }
print "</td>"; print "</td>";
print '</tr>'; print '</tr>';

View File

@ -6397,7 +6397,7 @@ abstract class CommonObject
$param = array(); $param = array();
$param['options'] = array(); $param['options'] = array();
$reg = array(); $reg = array();
$size = $this->fields[$key]['size']; $size = !empty($this->fields[$key]['size']) ? $this->fields[$key]['size'] : 0;
// Because we work on extrafields // Because we work on extrafields
if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N');
@ -6430,21 +6430,21 @@ abstract class CommonObject
} }
// Special case that force options and type ($type can be integer, varchar, ...) // Special case that force options and type ($type can be integer, varchar, ...)
if (is_array($this->fields[$key]['arrayofkeyval'])) { if (!empty($this->fields[$key]['arrayofkeyval']) && is_array($this->fields[$key]['arrayofkeyval'])) {
$param['options'] = $this->fields[$key]['arrayofkeyval']; $param['options'] = $this->fields[$key]['arrayofkeyval'];
$type = 'select'; $type = 'select';
} }
$label = $this->fields[$key]['label']; $label = $this->fields[$key]['label'];
//$elementtype=$this->fields[$key]['elementtype']; // Seems not used //$elementtype=$this->fields[$key]['elementtype']; // Seems not used
$default = $this->fields[$key]['default']; $default = (!empty($this->fields[$key]['default']) ? $this->fields[$key]['default'] : '');
$computed = $this->fields[$key]['computed']; $computed = (!empty($this->fields[$key]['computed']) ? $this->fields[$key]['computed'] : '');
$unique = $this->fields[$key]['unique']; $unique = (!empty($this->fields[$key]['unique']) ? $this->fields[$key]['unique'] : 0);
$required = $this->fields[$key]['required']; $required = (!empty($this->fields[$key]['required']) ? $this->fields[$key]['required'] : 0);
$autofocusoncreate = $this->fields[$key]['autofocusoncreate']; $autofocusoncreate = (!empty($this->fields[$key]['autofocusoncreate']) ? $this->fields[$key]['autofocusoncreate'] : 0);
$langfile = $this->fields[$key]['langfile']; $langfile = (!empty($this->fields[$key]['langfile']) ? $this->fields[$key]['langfile'] : '');
$list = $this->fields[$key]['list']; $list = (!empty($this->fields[$key]['list']) ? $this->fields[$key]['list'] : 0);
$hidden = (in_array(abs($this->fields[$key]['visible']), array(0, 2)) ? 1 : 0); $hidden = (in_array(abs($this->fields[$key]['visible']), array(0, 2)) ? 1 : 0);
$objectid = $this->id; $objectid = $this->id;

View File

@ -8325,10 +8325,10 @@ class Form
$nophoto = 'company'; $nophoto = 'company';
} else { } else {
$nophoto = '/public/theme/common/user_anonymous.png'; $nophoto = '/public/theme/common/user_anonymous.png';
if ($object->gender == 'man') { if (!empty($object->gender) && $object->gender == 'man') {
$nophoto = '/public/theme/common/user_man.png'; $nophoto = '/public/theme/common/user_man.png';
} }
if ($object->gender == 'woman') { if (!empty($object->gender) && $object->gender == 'woman') {
$nophoto = '/public/theme/common/user_woman.png'; $nophoto = '/public/theme/common/user_woman.png';
} }
} }

View File

@ -47,7 +47,7 @@ KnowledgeManagementArea = Knowledge Management
# Menu # Menu
# #
MenuKnowledgeRecord = Knowledge base MenuKnowledgeRecord = Knowledge base
ListOfArticles = List of articles ListKnowledgeRecord = List of articles
NewKnowledgeRecord = New article NewKnowledgeRecord = New article
ValidateReply = Validate solution ValidateReply = Validate solution
KnowledgeRecords = Articles KnowledgeRecords = Articles