Commit 6fb3671f authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

fixing uses of str_shorten which have truncate as false where it should be true

parent 9ad52315
......@@ -254,7 +254,7 @@ $smarty->display('interaction:forum:view.tpl');
function setup_topics(&$topics) {
if ($topics) {
foreach ($topics as $topic) {
$topic->body = str_shorten($topic->body, 50, false, false);
$topic->body = str_shorten($topic->body, 50, true, false);
$topic->lastposttime = relative_date(get_string('strftimerecentrelative', 'interaction.forum'), get_string('strftimerecent'), $topic->lastposttime);
}
}
......
......@@ -345,7 +345,7 @@ function setup_groups($groups, $returnto='mygroups') {
}
$i = 0;
foreach ($groups as $group) {
$group->description = str_shorten($group->description, 100, false);
$group->description = str_shorten($group->description, 100, true);
if ($group->type == 'member') {
$group->canleave = group_user_can_leave($group->id);
}
......
......@@ -839,7 +839,7 @@ function get_users_data($userlist) {
foreach ($data as &$record) {
if (isset($record->introduction)) {
$record->introduction = str_shorten($record->introduction, 100, false);
$record->introduction = str_shorten($record->introduction, 100, true);
}
$record->messages = ($record->messages == 'allow' || $record->friend && $record->messages == 'friends' || $USER->get('admin')) ? 1 : 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment