Index: openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-icanuse-procs.tcl,v diff -u -r1.1.2.32 -r1.1.2.33 --- openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 5 Jan 2022 14:00:20 -0000 1.1.2.32 +++ openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 5 Jan 2022 14:16:48 -0000 1.1.2.33 @@ -263,11 +263,23 @@ Partial backward compatibility function of "ns_baseunit ?-size size? ?-time time?" Only the time unit part is partially implemented, - therefore, icanuse is not set for that feature. + therefore, icanuse is not set for that feature, + since one should be able to trust blindly on this. } { if {[info exists size]} { - error "partial implementation of ns_baseunit does not support -size option" + # + # Rough approximation for AOLserver and older versions of NaviServer. + # + if {![string is integer -strict $size]} { + if {[regexp {^(\d+)([mk])b} [string tolower $specifiedSize] . amount unit]} { + set multipliers {k 1024 m 1048576} + set size [expr {[dict get $multipliers $unit] * $amount}] + } else { + error "invalid size specification '$size'" + } + } + return $size } if {![string is integer -strict $time]} { if {[regexp {^(\d+)d$} $time _ t]} { Index: openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl,v diff -u -r1.10.2.23 -r1.10.2.24 --- openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl 5 Jan 2022 13:09:37 -0000 1.10.2.23 +++ openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl 5 Jan 2022 14:16:48 -0000 1.10.2.24 @@ -58,19 +58,7 @@ if {[::nsf::is integer $specifiedSize]} { set size $specifiedSize } else { - if {[acs::icanuse ns_baseunit]} { - set size [ns_baseunit -size $specifiedSize] - } else { - # - # Rough approximation for older versions of NaviServer. - # - if {[regexp {^(\d+)([mk])b} [string tolower $specifiedSize] . amount unit]} { - set multipliers {k 1024 m 1048576} - set size [expr {[dict get $multipliers $unit] * $amount}] - } else { - error "invalid size specification '$specifiedSize'" - } - } + set size [ns_baseunit -size $specifiedSize] } return $size }