summaryrefslogtreecommitdiff
path: root/app/Module/TopSurnamesModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Module/TopSurnamesModule.php')
-rw-r--r--app/Module/TopSurnamesModule.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/app/Module/TopSurnamesModule.php b/app/Module/TopSurnamesModule.php
index f64906de43..85e0423737 100644
--- a/app/Module/TopSurnamesModule.php
+++ b/app/Module/TopSurnamesModule.php
@@ -17,6 +17,9 @@ namespace Fisharebest\Webtrees\Module;
*/
use Fisharebest\Webtrees\Auth;
use Fisharebest\Webtrees\Filter;
+use Fisharebest\Webtrees\Functions\FunctionsDb;
+use Fisharebest\Webtrees\Functions\FunctionsEdit;
+use Fisharebest\Webtrees\Functions\FunctionsPrintLists;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Query\QueryName;
use Fisharebest\Webtrees\Theme;
@@ -55,7 +58,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 = get_top_surnames($WT_TREE->getTreeId(), $COMMON_NAMES_THRESHOLD, $num);
+ $top_surnames = FunctionsDb::getTopSurnames($WT_TREE->getTreeId(), $COMMON_NAMES_THRESHOLD, $num);
// Remove names found in the "Remove Names" list
if ($COMMON_NAMES_REMOVE) {
@@ -95,20 +98,20 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface {
switch ($infoStyle) {
case 'tagcloud':
uksort($all_surnames, '\Fisharebest\Webtrees\I18N::strcasecmp');
- $content = format_surname_tagcloud($all_surnames, 'indilist.php', true, $WT_TREE);
+ $content = FunctionsPrintLists::surnameTagCloud($all_surnames, 'indilist.php', true, $WT_TREE);
break;
case 'list':
uasort($all_surnames, '\Fisharebest\Webtrees\Module\TopSurnamesModule::surnameCountSort');
- $content = format_surname_list($all_surnames, '1', true, 'indilist.php', $WT_TREE);
+ $content = FunctionsPrintLists::surnameList($all_surnames, '1', true, 'indilist.php', $WT_TREE);
break;
case 'array':
uasort($all_surnames, '\Fisharebest\Webtrees\Module\TopSurnamesModule::surnameCountSort');
- $content = format_surname_list($all_surnames, '2', true, 'indilist.php', $WT_TREE);
+ $content = FunctionsPrintLists::surnameList($all_surnames, '2', true, 'indilist.php', $WT_TREE);
break;
case 'table':
default:
uasort($all_surnames, '\Fisharebest\Webtrees\Module\TopSurnamesModule::surnameCountSort');
- $content = format_surname_table($all_surnames, 'indilist.php', $WT_TREE);
+ $content = FunctionsPrintLists::surnameTable($all_surnames, 'indilist.php', $WT_TREE);
break;
}
@@ -160,13 +163,13 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface {
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Presentation style');
echo '</td><td class="optionbox">';
- echo select_edit_control('infoStyle', array('list' => I18N::translate('bullet list'), 'array' => I18N::translate('compact list'), 'table' => I18N::translate('table'), 'tagcloud' => I18N::translate('tag cloud')), null, $infoStyle, '');
+ echo FunctionsEdit::selectEditControl('infoStyle', array('list' => I18N::translate('bullet list'), 'array' => I18N::translate('compact list'), 'table' => I18N::translate('table'), 'tagcloud' => I18N::translate('tag cloud')), null, $infoStyle, '');
echo '</td></tr>';
echo '<tr><td class="descriptionbox wrap width33">';
echo /* I18N: label for a yes/no option */ I18N::translate('Add a scrollbar when block contents grow');
echo '</td><td class="optionbox">';
- echo edit_field_yes_no('block', $block);
+ echo FunctionsEdit::editFieldYesNo('block', $block);
echo '</td></tr>';
}