From bbb9be5c9f07c670f3bfc55c23790550d03a22ee Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 23 May 2004 11:49:58 +0000 Subject: [PATCH] Avoid filtering names whose lenght is 2 or less chars. Bug 1441. (http://moodle.org/bugs/bug.php?op=show&bugid=1441) --- mod/resource/filter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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, ""); + } } } } -- 2.39.5