From: stronk7 Date: Sun, 23 May 2004 11:49:58 +0000 (+0000) Subject: Avoid filtering names whose lenght is 2 or less chars. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bbb9be5c9f07c670f3bfc55c23790550d03a22ee;p=moodle.git Avoid filtering names whose lenght is 2 or less chars. Bug 1441. (http://moodle.org/bugs/bug.php?op=show&bugid=1441) --- diff --git a/mod/resource/filter.php b/mod/resource/filter.php index c330a85207..0112963fd7 100644 --- a/mod/resource/filter.php +++ b/mod/resource/filter.php @@ -54,7 +54,10 @@ $href_tag_begin = "wwwroot/mod/resource/view.php?id=$cm->id\">"; $currentname = $resource->name; if ($currentname = trim($currentname)) { - $text = resource_link_names($text,$currentname,$href_tag_begin, ""); + //Only if the term is >2 lenght + if (strlen($currentname) >2) { + $text = resource_link_names($text,$currentname,$href_tag_begin, ""); + } } } }