Skip to content

Commit

Permalink
Show all surname variants in indi/fam list titles
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Apr 8, 2016
1 parent fdd299b commit 8bac6de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions famlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
$legend = I18N::translateContext('Unknown surname', '…');
} else {
$legend = Filter::escapeHtml($surname);
// The surname parameter is a root/canonical form.
// Display it as the actual surname
foreach (QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', true) as $details) {
$legend = implode('/', array_keys($details));
}
}
$url = WT_SCRIPT_NAME . '?surname=' . rawurlencode($surname) . '&ged=' . $WT_TREE->getNameUrl();
switch ($falpha) {
Expand Down
8 changes: 6 additions & 2 deletions indilist.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
*
* @global Tree $WT_TREE
*/
global
$WT_TREE;
global $WT_TREE;

use Fisharebest\Webtrees\Controller\PageController;
use Fisharebest\Webtrees\Functions\FunctionsPrintLists;
Expand Down Expand Up @@ -84,6 +83,11 @@
$legend = I18N::translateContext('Unknown surname', '…');
} else {
$legend = Filter::escapeHtml($surname);
// The surname parameter is a root/canonical form.
// Display it as the actual surname
foreach (QueryName::surnames($WT_TREE, $surname, $alpha, $show_marnm === 'yes', false) as $details) {
$legend = implode('/', array_keys($details));
}
}
$url = WT_SCRIPT_NAME . '?surname=' . rawurlencode($surname) . '&ged=' . $WT_TREE->getNameUrl();
switch ($falpha) {
Expand Down

0 comments on commit 8bac6de

Please sign in to comment.