Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 29 Aug 2002 15:15:11 -0000 1.8 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 8 Sep 2002 18:02:16 -0000 1.9 @@ -509,46 +509,8 @@ return $users_list } - ##### - # - # Truncate - # - ##### - ad_proc string_truncate { - {-len} - {-format html} - string - } { - Truncates a string to len characters (defaults to the - parameter TruncateDescriptionLength), adding an ellipsis (...) if the - string was truncated. If format is html (default), any open - HTML tags are closed. Otherwise, it's converted to text using - ad_html_to_text. - @param len The lenght to truncate to. Defaults to parameter TruncateDescriptionLength. - @param format html or text. - @param string The string to truncate. - @return The truncated string, with HTML tags cloosed or - converted to text, depending on format. - } { - if { ![info exists len] } { - set len [ad_parameter "TruncateDescriptionLength" -default 200] - } - - if { [string length $string] > $len } { - set string "[string range $string 0 $len]..." - } - - if { [string equal $format "html"] } { - set string [util_close_html_tags $string] - } else { - set string [ad_html_to_text -- $string] - } - return $string - } - - ##### #