Index: openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl 10 Jan 2007 21:21:59 -0000 1.7 +++ openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl 8 Dec 2012 18:20:35 -0000 1.8 @@ -65,7 +65,7 @@ } -validate { {proc - { ![empty_string_p [info procs ::${proc}]] } + { [info commands ::${proc} ne ""] } {The specified procedure name does not exist. Is the -procs.tcl file loaded?} } {proc Index: openacs-4/packages/acs-admin/www/install/install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/install/install.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-admin/www/install/install.tcl 10 Jan 2007 21:22:00 -0000 1.6 +++ openacs-4/packages/acs-admin/www/install/install.tcl 8 Dec 2012 18:20:35 -0000 1.7 @@ -69,8 +69,8 @@ foreach name [lsort -ascii [array names package]] { set row $package($name) - if {[info procs apm::package_version::attributes::maturity_int_to_text] != 0} { - set maturity_text "[apm::package_version::attributes::maturity_int_to_text [lindex $row 6]]" + if {[info commands ::apm::package_version::attributes::maturity_int_to_text] ne ""} { + set maturity_text [::apm::package_version::attributes::maturity_int_to_text [lindex $row 6]] } else { set maturity_text "" } Index: openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl,v diff -u -r1.39 -r1.40 --- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 30 Oct 2010 21:43:01 -0000 1.39 +++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 8 Dec 2012 18:20:36 -0000 1.40 @@ -433,7 +433,7 @@ } if { $callback ne "" && $impl ne "" } { - if { [llength [info procs "::callback::${callback}::contract__arg_parser"]] == 0 } { + if { [info commands "::callback::${callback}::contract__arg_parser"] eq "" } { # We create a dummy arg parser for the contract in case # the contract hasn't been defined yet. We need this # because the implementation doesn't tell us what the @@ -783,16 +783,15 @@ # arg validation -- ::callback::${callback}::contract is an # empty function that only runs the ad_proc generated arg parser. - if {[llength [info proc ::callback::${callback}::contract]] != 1} { + if {[info commands ::callback::${callback}::contract] eq ""} { error "Undefined callback $callback" } eval ::callback::${callback}::contract $args set returns {} set base ::callback::${callback}::impl - foreach procname [lsort [info procs ${base}::$impl]] { - + foreach procname [lsort [info commands ${base}::$impl]] { set c [catch {::uplevel 1 $procname $args} ret] switch -exact $c { 0 { # code ok Index: openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl,v diff -u -r1.34 -r1.35 --- openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 13 Feb 2009 20:28:08 -0000 1.34 +++ openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 8 Dec 2012 18:20:36 -0000 1.35 @@ -444,7 +444,7 @@ # Call db_release_unused_handles, only if the library defining it # (10-database-procs.tcl) has been sourced yet. - if { [llength [info procs db_release_unused_handles]] != 0 } { + if { [info commands db_release_unused_handles] ne ""} { db_release_unused_handles } } Index: openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl,v diff -u -r1.40 -r1.41 --- openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl 10 Jan 2007 21:22:03 -0000 1.40 +++ openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl 8 Dec 2012 18:20:36 -0000 1.41 @@ -16,7 +16,7 @@ # The following code allows ad_proc to be used # here (a local workalike is declared if absent). # added 2002-09-11 Jeff Davis (davis@xarg.net) -if {{} ne [info procs ad_library] } { +if {[info commands ad_library] ne "" } { ad_library { Query Dispatching for multi-RDBMS capability @@ -26,7 +26,7 @@ } } -if { {} ne [info procs ad_proc] } { +if { [info commands ad_proc] ne ""} { set remove_ad_proc_p 0 } else { set remove_ad_proc_p 1 Index: openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 13 Apr 2007 10:23:25 -0000 1.8 +++ openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 8 Dec 2012 18:20:36 -0000 1.9 @@ -199,9 +199,7 @@ } { - return [expr ![string equal \ - [namespace eval $namespace_name \ - "info procs $proc_name"] {}]] + return [expr {[namespace eval $namespace_name "info commands $proc_name"] ne ""}] } ########################################################## Index: openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl,v diff -u -r1.51 -r1.52 --- openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 22 Jan 2010 17:05:20 -0000 1.51 +++ openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 8 Dec 2012 18:20:36 -0000 1.52 @@ -20,7 +20,7 @@ Do we have permission to view developer support stuff. } { set party_id [ds_ad_conn user_id] - if {$party_id == 0} { + if {$party_id == 0 || $party_id eq ""} { # set up a fake id in order to make user_switching mode work # with # non logged users, if not it will enter into a infinite loop @@ -64,20 +64,19 @@ ad_proc -public ds_collection_enabled_p {} { Returns whether we're collecting information about this request } { - global ad_conn - if { [info exists ad_conn(ds_collection_enabled_p)] } { - return $ad_conn(ds_collection_enabled_p) + if { [info exists ::ad_conn(ds_collection_enabled_p)] } { + return $::ad_conn(ds_collection_enabled_p) } - if { ![info exists ad_conn(request)] } { + if { ![info exists ::ad_conn(request)] } { return 0 } foreach pattern [nsv_get ds_properties enabled_ips] { if { [string match $pattern [ad_conn peeraddr]] } { - set ad_conn(ds_collection_enabled_p) 1 + set ::ad_conn(ds_collection_enabled_p) 1 return 1 } } - set ad_conn(ds_collection_enabled_p) 0 + set ::ad_conn(ds_collection_enabled_p) 0 return 0 } @@ -191,46 +190,45 @@ set out "