aboutsummaryrefslogtreecommitdiff
path: root/mod/notifications
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-25 12:00:44 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-25 12:00:44 +0000
commit7dffca0c05420e9734726a6d053b31305e9cda25 (patch)
treeb7ea959ac9c6c00c5f30f138d35fc4d70164d38f /mod/notifications
parentc8d31fc57145732d489548b5866cf0cda51a3393 (diff)
downloadelgg-7dffca0c05420e9734726a6d053b31305e9cda25.tar.gz
elgg-7dffca0c05420e9734726a6d053b31305e9cda25.tar.bz2
Unicode character fix for friends picker. Fixes #281
git-svn-id: https://code.elgg.org/elgg/trunk@2941 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/notifications')
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/forminternals.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
index d8c1a34f8..aa6b2454d 100644
--- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php
+++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
@@ -73,8 +73,11 @@
// Sort users by letter
if (is_array($friends) && sizeof($friends))
foreach($friends as $user) {
-
- $letter = strtoupper(substr($user->name,0,1));
+
+ if (is_callable('mb_substr'))
+ $letter = strtoupper(mb_substr($user->name,0,1));
+ else
+ $letter = strtoupper(substr($user->name,0,1));
if (!substr_count($chararray,$letter)) {
$letter = "*";
}
@@ -147,8 +150,11 @@
<div class="friendsPicker_container">
<?php
- // Initialise letters
- $letter = substr($chararray,0,1);
+ // Initialise letters
+ if (is_callable('mb_substr'))
+ $letter = mb_substr($chararray,0,1);
+ else
+ $letter = substr($chararray,0,1);
$letpos = 0;
$chararray .= '*';
while (1 == 1) {
@@ -239,7 +245,10 @@ END;
<?php
$letpos++;
if ($letpos == strlen($chararray)) break;
- $letter = substr($chararray,$letpos,1);
+ if (is_callable('mb_substr'))
+ $letter = mb_substr($chararray,$letpos,1);
+ else
+ $letter = substr($chararray,$letpos,1);
}
?>