summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions.php6
-rw-r--r--includes/functions/functions_print.php4
2 files changed, 3 insertions, 7 deletions
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index 68c05b00a0..d4b50c8644 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -333,12 +333,6 @@ function get_cont($nlevel, $nrec) {
return rtrim($text, " ");
}
-// ************************************************* START OF SORTING FUNCTIONS ********************************* //
-// Function to sort GEDCOM fact tags based on their translations
-function factsort($a, $b) {
- return utf8_strcasecmp(WT_I18N::translate($a), WT_I18N::translate($b));
-}
-
////////////////////////////////////////////////////////////////////////////////
// Sort a list events for the today/upcoming blocks
////////////////////////////////////////////////////////////////////////////////
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index 2f0cd0274f..d5d5ce60fd 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -955,7 +955,9 @@ function print_add_new_fact($id, $usedfacts, $type) {
foreach ($addfacts as $addfact) {
$translated_addfacts[$addfact] = WT_Gedcom_Tag::getLabel($addfact);
}
- uasort($translated_addfacts, 'factsort');
+ uasort($translated_addfacts, function ($x, $y) {
+ return utf8_strcasecmp(WT_I18N::translate($x), WT_I18N::translate($y));
+ });
echo '<tr><td class="descriptionbox">';
echo WT_I18N::translate('Fact or event');
echo help_link('add_facts'), '</td>';