diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-11-12 16:04:51 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-11-12 16:04:51 +0000 |
| commit | 216d0e6772053371a8bd1a34945a55ed16be0f41 (patch) | |
| tree | 5fec97fec490b2305d336e3d7fe4b4c6fb0c8e34 | |
| parent | 9b7de30e5cf53266a8632b835f383e1cabc228d3 (diff) | |
| download | webtrees-216d0e6772053371a8bd1a34945a55ed16be0f41.tar.gz webtrees-216d0e6772053371a8bd1a34945a55ed16be0f41.tar.bz2 webtrees-216d0e6772053371a8bd1a34945a55ed16be0f41.zip | |
#657802 - report pedigree chart
| -rw-r--r-- | includes/classes/class_reportbase.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/classes/class_reportbase.php b/includes/classes/class_reportbase.php index 1838502010..ef942103dc 100644 --- a/includes/classes/class_reportbase.php +++ b/includes/classes/class_reportbase.php @@ -2169,7 +2169,7 @@ function GetPersonNameSHandler($attrs) { //short-circuit with the faster strlen if (strlen($name)>$attrs["truncate"] && utf8_strlen($name)>$attrs["truncate"]) { $name = preg_replace("/\(.*\) ?/", "", $name); //removes () and text inbetween - what about ", [ and { etc? - $words = explode(" ", $name); + $words = preg_split('/[, -]+/', $name); // names separated with space, comma or hyphen - any others? $name = $words[count($words)-1]; for ($i=count($words)-2; $i>=0; $i--) { $len = utf8_strlen($name); |
