Fix name into popup of member in list of subscriptions

This commit is contained in:
Laurent Destailleur 2020-11-27 01:22:13 +01:00
parent 47a5037155
commit 7bf12c8720
2 changed files with 3 additions and 5 deletions

View File

@ -1988,7 +1988,7 @@ class Adherent extends CommonObject
* @param int $withpictoimg 0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small)
* @param int $maxlen length max label
* @param string $option Page for link ('card', 'category', 'subscription', ...)
* @param string $mode ''=Show firstname+lastname as label (using default order), 'firstname'=Show only firstname, 'login'=Show login, 'ref'=Show ref
* @param string $mode ''=Show firstname+lastname as label (using default order), 'firstname'=Show only firstname, 'lastname'=Show only lastname, 'login'=Show login, 'ref'=Show ref
* @param string $morecss Add more css on link
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @param int $notooltip 1=Disable tooltip
@ -2072,7 +2072,7 @@ class Adherent extends CommonObject
} elseif ($mode == 'ref') {
$result .= $this->id;
} else {
$result .= $this->getFullName($langs, '', ($mode == 'firstname' ? 2 : -1), $maxlen);
$result .= $this->getFullName($langs, '', ($mode == 'firstname' ? 2 : ($mode == 'lastname' ? 4 : -1)), $maxlen);
}
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result .= '</span>';
}

View File

@ -433,9 +433,7 @@ while ($i < min($num, $limit)) {
// Lastname
if (!empty($arrayfields['d.lastname']['checked'])) {
$adherent->firstname = '';
print '<td>'.$adherent->getNomUrl(-1).'</td>';
$adherent->firstname = $obj->firstname;
print '<td>'.$adherent->getNomUrl(-1, 0, 'card', 'lastname').'</td>';
if (!$i) $totalarray['nbfield']++;
}
// Firstname