Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -r1.111 -r1.112 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 25 Sep 2017 17:59:21 -0000 1.111 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 17 Dec 2017 19:54:35 -0000 1.112 @@ -812,7 +812,7 @@ set spec_file_path [apm_package_info_file_path -path [file dirname $package_path] $package_key] } - with_catch errmsg { + ad_try { set package_uri $version(package.url) set package_type $version(package.type) set package_name $version(package-name) @@ -936,7 +936,7 @@ apm_build_subsite_packages_list apm_callback_and_log $callback "

[lindex $operations 1] $version(package-name), version $version(name).

" - } { + } on error {errmsg} { ns_log Error "apm_package_install: Error installing $version(package-name) version $version(name): $errmsg\n$::errorInfo" apm_callback_and_log -severity Error $callback [subst {

Failed to install $version(package-name), version $version(name). The following error was generated: @@ -2132,7 +2132,7 @@ set spec_files [apm_scan_packages "$::acs::rootdir/packages"] lappend spec_files {*}[apm_scan_packages] foreach spec_file $spec_files { - with_catch errmsg { + ad_try { array unset version array set version [apm_read_package_info_file $spec_file] @@ -2155,7 +2155,7 @@ set repository($version(package.key)) [array get version] } } - } { + } on error {errmsg} { # We don't error hard here, because we don't want the whole process to fail if there's just one # package with a bad .info file ns_log Error "apm_get_package_repository: Error while checking package info file $spec_file: $errmsg\n$::errorInfo" Index: openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl 7 Aug 2017 23:47:59 -0000 1.20 +++ openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl 17 Dec 2017 19:54:35 -0000 1.21 @@ -251,15 +251,15 @@ # 2. try to get a package_id for this package_key and use the standard # parameter::get function to get the value if {$value eq ""} { - with_catch errmsg { + ad_try { set value [parameter::get \ -localize=$localize_p \ -boolean=$boolean_p \ -package_id [apm_package_id_from_key $package_key] \ -parameter $parameter \ -default $default \ ] - } { + } on error {errmsg} { set value $default } } Index: openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl 7 Aug 2017 23:47:59 -0000 1.6 +++ openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl 17 Dec 2017 19:54:35 -0000 1.7 @@ -25,7 +25,7 @@ @param cd change to the given directory before executing the command } { set handle [ns_proxy get ExecPool] - with_finally -code { + ad_try { if {[info exists cd]} { # # We were requested to switch to a different @@ -36,7 +36,7 @@ ns_proxy eval $handle [list cd $cd] } set return_string [ns_proxy eval $handle [list ::exec {*}$call]] - } -finally { + } finally { if {[info exists pwd]} { # # Switch back to the previous directory. Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.81 -r1.82 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 1 Oct 2017 12:16:05 -0000 1.81 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 17 Dec 2017 19:54:35 -0000 1.82 @@ -725,6 +725,7 @@ # login. # set url / + set subsite_id $package_id if {$UseHostnameDomainforReg} { set url [subsite::get_element -subsite_id $package_id -element url] @@ -764,9 +765,9 @@ # we'll get into an infinite redirect loop. # array set site_node [site_node::get_from_url -url $url] - set package_id $site_node(object_id) + set subsite_id $site_node(object_id) if { ![permission::permission_p -no_login \ - -object_id $site_node(object_id) \ + -object_id $subsite_id \ -privilege read \ -party_id 0] } { set url / @@ -778,6 +779,7 @@ # subsite. # set url / + set subsite_id [site_node::get_object_id -node_id $host_node_id] } if {$UseHostnameDomainforReg} { set url [security::get_qualified_url $url] @@ -786,6 +788,7 @@ } return [list \ url $url \ + subsite_id $subsite_id \ require_qualified_return_url $require_qualified_return_url \ host_node_id $host_node_id] } Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -r1.97 -r1.98 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 22 Nov 2017 12:15:29 -0000 1.97 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 17 Dec 2017 19:54:35 -0000 1.98 @@ -113,7 +113,7 @@ # Grab the lock so our URL key doesn't change on us midstream ns_mutex lock [nsv_get site_nodes_mutex mutex] - with_finally -code { + ad_try { set url [site_node::get_url -node_id $parent_id] append url $name if { $directory_p == "t" } { append url "/" } @@ -124,7 +124,7 @@ object_id "" object_type "" \ package_key "" package_id "" \ instance_name "" package_type ""] - } -finally { + } finally { ns_mutex unlock [nsv_get site_nodes_mutex mutex] } @@ -187,7 +187,7 @@ ns_mutex lock [nsv_get site_nodes_mutex mutex] - with_finally -code { + ad_try { #Now update the nsv caches. array set node [site_node::get_from_node_id -node_id $node_id] @@ -230,7 +230,7 @@ } nsv_set site_node_url_by_package_key $package_key $url_by_package_key } - } -finally { + } finally { ns_mutex unlock [nsv_get site_nodes_mutex mutex] } @@ -391,7 +391,7 @@ # until cache is fully updated ns_mutex lock [nsv_get site_nodes_mutex mutex] - with_finally -code { + ad_try { # Lars: We need to record the object_id's touched, so we can sort the # object_id->url mappings again. We store them sorted by length of the URL @@ -494,7 +494,7 @@ -command util::string_length_compare \ [nsv_get site_node_url_by_object_id $object_id] ] } - } -finally { + } finally { ns_mutex unlock [nsv_get site_nodes_mutex mutex] } }