diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-06-05 20:16:40 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-06-05 21:53:48 +0100 |
| commit | 3d7a8a4ca809135634f38216b734b15acff479f7 (patch) | |
| tree | 4bbe1480119d706851833f3efb4911d62aa52a45 /app/Module/FamilyTreeStatisticsModule.php | |
| parent | fa77f9bd0ddd6a305a367135bc6178fceb44776b (diff) | |
| download | webtrees-3d7a8a4ca809135634f38216b734b15acff479f7.tar.gz webtrees-3d7a8a4ca809135634f38216b734b15acff479f7.tar.bz2 webtrees-3d7a8a4ca809135634f38216b734b15acff479f7.zip | |
Refactor includes/functions into classes
Diffstat (limited to 'app/Module/FamilyTreeStatisticsModule.php')
| -rw-r--r-- | app/Module/FamilyTreeStatisticsModule.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/Module/FamilyTreeStatisticsModule.php b/app/Module/FamilyTreeStatisticsModule.php index 3365a92d7c..1825afd6cb 100644 --- a/app/Module/FamilyTreeStatisticsModule.php +++ b/app/Module/FamilyTreeStatisticsModule.php @@ -17,6 +17,8 @@ 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\I18N; use Fisharebest\Webtrees\Stats; use Fisharebest\Webtrees\Theme; @@ -187,7 +189,7 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn } // NOTE: Print the most common surnames if ($show_common_surnames) { - $surnames = get_common_surnames($WT_TREE->getPreference('COMMON_NAMES_THRESHOLD'), $WT_TREE); + $surnames = FunctionsDb::getCommonSurnames($WT_TREE->getPreference('COMMON_NAMES_THRESHOLD'), $WT_TREE); if (count($surnames) > 0) { $content .= '<p><b>' . I18N::translate('Most common surnames') . '</b></p>'; $content .= '<div class="common_surnames">'; @@ -272,13 +274,13 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn echo '<tr><td class="descriptionbox wrap width33">'; echo /* I18N: label for yes/no option */ I18N::translate('Show date of last update?'); echo '</td><td class="optionbox">'; - echo edit_field_yes_no('show_last_update', $show_last_update); + echo FunctionsEdit::editFieldYesNo('show_last_update', $show_last_update); echo '</td></tr>'; echo '<tr><td class="descriptionbox wrap width33">'; echo I18N::translate('Show common surnames?'); echo '</td><td class="optionbox">'; - echo edit_field_yes_no('show_common_surnames', $show_common_surnames); + echo FunctionsEdit::editFieldYesNo('show_common_surnames', $show_common_surnames); echo '</td></tr>'; ?> |
