Avoid filtering names whose lenght is 2 or less chars.

Bug 1441.
(http://moodle.org/bugs/bug.php?op=show&bugid=1441)
This commit is contained in:
stronk7
2004-05-23 11:49:58 +00:00
parent affee369dc
commit bbb9be5c9f
+4 -1
View File
@@ -54,7 +54,10 @@
$href_tag_begin = "<a class=\"autolink\" title=\"$title\" href=\"$CFG->wwwroot/mod/resource/view.php?id=$cm->id\">";
$currentname = $resource->name;
if ($currentname = trim($currentname)) {
$text = resource_link_names($text,$currentname,$href_tag_begin, "</a>");
//Only if the term is >2 lenght
if (strlen($currentname) >2) {
$text = resource_link_names($text,$currentname,$href_tag_begin, "</a>");
}
}
}
}