]> git.mjollnir.org Git - moodle.git/commitdiff
Avoid filtering names whose lenght is 2 or less chars.
authorstronk7 <stronk7>
Sun, 23 May 2004 11:49:58 +0000 (11:49 +0000)
committerstronk7 <stronk7>
Sun, 23 May 2004 11:49:58 +0000 (11:49 +0000)
Bug 1441.
(http://moodle.org/bugs/bug.php?op=show&bugid=1441)

mod/resource/filter.php

index c330a852076ea36f56b4c8e3ecbd20915365283a..0112963fd7934d879e766f284c5e69896aaced79 100644 (file)
                 $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>");
+                    }
                 }
             }
         }