1
1
Fork 0

don't truncate names across multi-byte char sequences

This commit is contained in:
Friendika 2011-02-24 03:48:21 -08:00
parent 5641532936
commit 8ed085c64e

View file

@ -26,7 +26,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
$selected = " selected=\"selected\" ";
else
$selected = '';
$trimmed = substr($rr['name'],0,12);
$trimmed = mb_substr($rr['name'],0,12);
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}\" >$trimmed</option>\r\n";
}
@ -89,7 +89,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
else
$selected = '';
$trimmed = substr($rr['name'],0,22);
$trimmed = mb_substr($rr['name'],0,22);
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}|{$rr['url']}\" >$trimmed</option>\r\n";
}