From 784e1b4bc2b28a54307c23676a35e0393f5f7e80 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sat, 21 May 2016 19:28:20 +0100 Subject: Common surname preferences apply only to common surname list --- app/Module/TopSurnamesModule.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'app') diff --git a/app/Module/TopSurnamesModule.php b/app/Module/TopSurnamesModule.php index 76805fe1a8..ee41cdfc89 100644 --- a/app/Module/TopSurnamesModule.php +++ b/app/Module/TopSurnamesModule.php @@ -58,9 +58,6 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface { public function getBlock($block_id, $template = true, $cfg = array()) { global $WT_TREE, $ctype; - $COMMON_NAMES_REMOVE = $WT_TREE->getPreference('COMMON_NAMES_REMOVE'); - $COMMON_NAMES_THRESHOLD = $WT_TREE->getPreference('COMMON_NAMES_THRESHOLD'); - $num = $this->getBlockSetting($block_id, 'num', '10'); $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', 'table'); @@ -71,15 +68,7 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface { } // This next function is a bit out of date, and doesn't cope well with surname variants - $top_surnames = FunctionsDb::getTopSurnames($WT_TREE->getTreeId(), $COMMON_NAMES_THRESHOLD, $num); - - // Remove names found in the "Remove Names" list - if ($COMMON_NAMES_REMOVE) { - foreach (preg_split("/[,; ]+/", $COMMON_NAMES_REMOVE) as $delname) { - unset($top_surnames[$delname]); - unset($top_surnames[I18N::strtoupper($delname)]); - } - } + $top_surnames = FunctionsDb::getTopSurnames($WT_TREE->getTreeId(), 0, $num); $all_surnames = array(); $i = 0; -- cgit v1.3