MDL-43760 Potential fix for fletcher scott issues with fullname.

This commit is contained in:
Damyon Wiese 2014-01-20 13:37:51 +08:00
parent d9aa7cbb6f
commit 62415470ae

View file

@ -3628,7 +3628,7 @@ function fullname($user, $override=false) {
// The special characters are Japanese brackets that are common enough to make allowances for them (not covered by :punct:). // The special characters are Japanese brackets that are common enough to make allowances for them (not covered by :punct:).
$patterns[] = '/[[:punct:]「」]*EMPTY[[:punct:]「」]*/u'; $patterns[] = '/[[:punct:]「」]*EMPTY[[:punct:]「」]*/u';
// This regular expression is to remove any double spaces in the display name. // This regular expression is to remove any double spaces in the display name.
$patterns[] = '/\s{2,}/'; $patterns[] = '/\s{2,}/u';
foreach ($patterns as $pattern) { foreach ($patterns as $pattern) {
$displayname = preg_replace($pattern, ' ', $displayname); $displayname = preg_replace($pattern, ' ', $displayname);
} }