Skip to content

Commit

Permalink
Better fix for #28755 #28752
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 11, 2024
1 parent b3ee7c3 commit 509754f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/societe/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ function formatCustomerSelection (selection) {
print '<td colspan="3" class="maxwidthonsmartphone">';
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', '0', 0, 0, 'AND u.statut = 1', 0, '', '', 0, 2);
// Note: If user has no right to "see all thirdparties", we force selection of sale representative to him, so after creation he can see the record.
$selected = (count(GETPOSTINT('commercial')) > 0 ? GETPOSTINT('commercial') : (GETPOSTINT('commercial') > 0 ? array(GETPOSTINT('commercial')) : (!$user->hasRight('societe', 'client', 'voir') ? array($user->id) : array())));
$selected = (GETPOSTISARRAY('commercial') ? GETPOST('commercial', 'array:int') : (GETPOSTINT('commercial') > 0 ? array(GETPOSTINT('commercial')) : (!$user->hasRight('societe', 'client', 'voir') ? array($user->id) : array())));

This comment has been minimized.

Copy link
@mdeweerd

mdeweerd Mar 11, 2024

Contributor

Does GETPOST('commercial', 'array:int') not work for a single item to get the single item back as an array?

print img_picto('', 'user').$form->multiselectarray('commercial', $userlist, $selected, null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
print '</td></tr>';

Expand Down

0 comments on commit 509754f

Please sign in to comment.