projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c254c68
)
Use the particle as name if name is empty
author
Pascal Corpet
<pascal.corpet@m4x.org>
Sun, 6 Jun 2010 13:43:12 +0000
(15:43 +0200)
committer
Pascal Corpet
<pascal.corpet@m4x.org>
Sun, 6 Jun 2010 13:43:12 +0000
(15:43 +0200)
modules/profile/general.inc.php
patch
|
blob
|
blame
|
history
diff --git
a/modules/profile/general.inc.php
b/modules/profile/general.inc.php
index
5ba5a8f
..
6967a38
100644
(file)
--- 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 = '';