summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2014-04-25 22:34:30 +0100
committerGreg Roach <fisharebest@gmail.com>2014-04-25 22:34:30 +0100
commit13496eee45083d507822035e02229549e9f7b256 (patch)
tree7b521ca1a444389c5bedceb292fc9219a450db5e /includes
parentc7282af01a0c873064526f9d60cbbacf723978ae (diff)
downloadwebtrees-13496eee45083d507822035e02229549e9f7b256.tar.gz
webtrees-13496eee45083d507822035e02229549e9f7b256.tar.bz2
webtrees-13496eee45083d507822035e02229549e9f7b256.zip
Move global function to local scope
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>';