Index: openacs-4/packages/acs-tcl/acs-tcl.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/acs-tcl.info,v
diff -u -r1.95.2.13 -r1.95.2.14
--- openacs-4/packages/acs-tcl/acs-tcl.info 22 May 2020 12:18:19 -0000 1.95.2.13
+++ openacs-4/packages/acs-tcl/acs-tcl.info 6 Jun 2020 09:47:48 -0000 1.95.2.14
@@ -9,7 +9,7 @@
f
t
-
+
OpenACS
The Kernel Tcl API library.
2017-08-06
@@ -18,7 +18,7 @@
GPL version 2
3
-
+
Index: openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl,v
diff -u -r1.1.2.8 -r1.1.2.9
--- openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 25 May 2020 10:21:08 -0000 1.1.2.8
+++ openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 6 Jun 2020 09:47:48 -0000 1.1.2.9
@@ -53,6 +53,18 @@
catch [list $cmd ""] errorMsg
return [expr {" $subcommand" in [split $errorMsg ","]}]
}
+
+ ad_proc -private cmd_error_contains {cmd subcommand} {
+
+ Helper proc abusing error messages to determine, whether the
+ error message contains some string. This is a weeker form of
+ cmd_has_subcommand.
+
+ } {
+ catch $cmd errorMsg
+ return [string match *$subcommand* $errorMsg]
+ }
+
}
@@ -72,6 +84,7 @@
::acs::register_icanuse "ns_conn partialtimes" [acs::cmd_has_subcommand ns_conn partialtimes]
::acs::register_icanuse "ns_conn contentsentlength" [acs::cmd_has_subcommand ns_conn contentsentlength]
+::acs::register_icanuse "nsv_dict" [acs::cmd_error_contains {nsv_dict get ""} -varname]
::acs::register_icanuse "ns_crypto::randombytes" {[info commands ::ns_crypto::randombytes] ne ""}