aboutsummaryrefslogtreecommitdiff
path: root/mod/notifications/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/notifications/views')
-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);
}
?>