From faf5f8341f017a4cb92c28d3a20675d6f400cef9 Mon Sep 17 00:00:00 2001 From: Pascal Corpet Date: Sun, 6 Jun 2010 15:43:12 +0200 Subject: [PATCH] Use the particle as name if name is empty --- modules/profile/general.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 5ba5a8f..6967a38 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -153,11 +153,18 @@ class ProfileSettingSearchNames implements ProfileSetting } if ($sn['pub']) { if (isset($sn['particle']) && ($sn['particle'] != '')) { + // particle is before first blank list($particle, $name) = explode(' ', $sn['name'], 2); $particle = trim($particle) . ' '; if (!$name) { + // particle is before first quote list($particle, $name) = explode('\'', $sn['name'], 2); $particle = trim($particle); + if (!$name) { + // actually there is no particle + $particle = ''; + $name = $sn['name']; + } } } else { $particle = ''; -- 2.1.4