diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-05-04 22:26:21 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-05-04 22:26:21 +0000 |
| commit | f9f2f8a64e4580cbd582ee2194de8a8ca3222d67 (patch) | |
| tree | 39d451f5be676a951a0090af0fbf3d1260724874 /includes | |
| parent | 0994d8418a835b06f7ecb77d2a852ee0db86b42a (diff) | |
| download | webtrees-f9f2f8a64e4580cbd582ee2194de8a8ca3222d67.tar.gz webtrees-f9f2f8a64e4580cbd582ee2194de8a8ca3222d67.tar.bz2 webtrees-f9f2f8a64e4580cbd582ee2194de8a8ca3222d67.zip | |
#570698 Most Common Surnames Block formatting
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/functions/functions_name.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/functions/functions_name.php b/includes/functions/functions_name.php index 4857106697..e64381cfda 100644 --- a/includes/functions/functions_name.php +++ b/includes/functions/functions_name.php @@ -44,12 +44,12 @@ function get_common_surnames($min) { global $COMMON_NAMES_ADD, $COMMON_NAMES_REMOVE; $topsurns=get_top_surnames(WT_GED_ID, $min, 0); - foreach (preg_split('/[,;] /', $COMMON_NAMES_ADD) as $surname) { - if (!array_key_exists($surname, $topsurns)) { + foreach (explode(',', $COMMON_NAMES_ADD) as $surname) { + if ($surname && !array_key_exists($surname, $topsurns)) { $topsurns[$surname]=$min; } } - foreach (preg_split('/[,;] /', $COMMON_NAMES_REMOVE) as $surname) { + foreach (explode(',', $COMMON_NAMES_REMOVE) as $surname) { unset($topsurns[utf8_strtoupper($surname)]); } |
