Merge branch 'w36_MDL-29014_m22_str' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2011-09-13 12:45:34 +12:00
commit 62b214d9a6
10 changed files with 22 additions and 22 deletions

View file

@ -252,7 +252,7 @@ class block_navigation extends block_base {
// Truncate the text to $long characters
$node->text = $this->trim_left($textlib, $node->text, $long);
}
if (is_string($node->shorttext) && strlen($node->shorttext)>($short+3)) {
if (is_string($node->shorttext) && $textlib->strlen($node->shorttext)>($short+3)) {
// Truncate the shorttext
$node->shorttext = $this->trim_left($textlib, $node->shorttext, $short);
}
@ -262,7 +262,7 @@ class block_navigation extends block_base {
// Truncate the text to $long characters
$node->text = $this->trim_center($textlib, $node->text, $long);
}
if (is_string($node->shorttext) && strlen($node->shorttext)>($short+3)) {
if (is_string($node->shorttext) && $textlib->strlen($node->shorttext)>($short+3)) {
// Truncate the shorttext
$node->shorttext = $this->trim_center($textlib, $node->shorttext, $short);
}

View file

@ -223,7 +223,7 @@
if(empty($title)){
// no title present, use portion of description
$title = substr(strip_tags($description), 0, 20) . '...';
$title = textlib::substr(strip_tags($description), 0, 20) . '...';
}else{
$title = break_up_long_words($title, 30);
}