Index: openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl,v diff -u -r1.49.2.3 -r1.49.2.4 --- openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 20 Mar 2003 10:30:29 -0000 1.49.2.3 +++ openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 20 Mar 2003 13:45:43 -0000 1.49.2.4 @@ -35,33 +35,11 @@ chars to a dash. Yes, this is not unique, grows rapidly, will need collision detection and resolution, yada yada. } { - set next "" - regsub -all {\W+} $name "-" name - regsub -all -- {-+} $name "-" name - set name [string tolower [string trim $name {-}]] - - # Remove non-US ASCII characters - set name [util_text_to_url -replacement {} $name] - - if {$increment_p} { - # increment the key by checking if the last 2 chars are -int - # if so, incr the int. if not add "-1" to the key - regexp -- {^(.*)-(\d+)$} $name match namepart intpart - - if {[info exists intpart]} { - set name "$namepart-[incr intpart]" - } else { - set name "$name-1" - } - } - - #bad things happen if the group name is the same as a dotlrn file name. - set conflicting_names [list members configure spam index not-allowed clone help] - if { [lsearch -exact $conflicting_names $name] != -1 } { - lappend name "-1" - } - - return $name + return [util_text_to_url \ + -replacement {} \ + -existing_urls { members configure spam index not-allowed clone help } \ + -no_resolve=[expr !$increment_p] \ + $name] } ad_proc -private do_abort {} {