@@ -258,7 +258,8 @@ discard block |
||
258 | 258 | <li class="wt-initials-list-item d-flex"> |
259 | 259 | <?php if ($count > 0) : ?> |
260 | 260 | <a href="<?= e($this->listUrl($tree, ['alpha' => $letter, 'show_marnm' => $show_marnm, 'tree' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->displaySurnameInitial((string) $letter) ?></a> |
261 | - <?php else : ?> |
|
261 | + <?php else { |
|
262 | + : ?> |
|
262 | 263 | <span class="wt-initial px-1 text-muted"><?= $this->displaySurnameInitial((string) $letter) ?></span> |
263 | 264 | |
264 | 265 | <?php endif ?> |
@@ -312,6 +313,7 @@ discard block |
||
312 | 313 | switch ($alpha) { |
313 | 314 | case '@': |
314 | 315 | $filter = static fn (string $x): bool => $x === Individual::NOMEN_NESCIO; |
316 | +} |
|
315 | 317 | break; |
316 | 318 | case ',': |
317 | 319 | $filter = static fn (string $x): bool => $x === ''; |
@@ -716,10 +718,11 @@ discard block |
||
716 | 718 | assert($individual instanceof Individual); |
717 | 719 | |
718 | 720 | // The name from the database may be private - check the filtered list... |
719 | - foreach ($individual->getAllNames() as $n => $name) |
|
720 | - if ($name['givn'] === $row->n_givn && $name['surn'] === $row->n_surn) |
|
721 | + foreach ($individual->getAllNames() as $n => $name) { |
|
722 | + if ($name['givn'] === $row->n_givn && $name['surn'] === $row->n_surn) |
|
721 | 723 | if ($galpha === '' || I18N::language()->initialLetter(I18N::language()->normalize(I18N::strtoupper($row->n_givn))) === $galpha) { |
722 | 724 | $individual->setPrimaryName($n); |
725 | + } |
|
723 | 726 | // We need to clone $individual, as we may have multiple references to the |
724 | 727 | // same individual in this list, and the "primary name" would otherwise |
725 | 728 | // be shared amongst all of them. |