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.40 -r1.41 --- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 8 Dec 2012 18:20:36 -0000 1.40 +++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 12 Apr 2013 16:12:56 -0000 1.41 @@ -950,3 +950,8 @@ return 1 } + +# handling NaviServer deprecated ns_info subcommands. +namespace eval acs {} +set ::acs::pageroot [expr {[catch {ns_server pagedir}] ? [ns_info pageroot] : [ns_server pagedir]}] +set ::acs::tcllib [expr {[catch {ns_server tcllib}] ? [ns_info tcllib] : [ns_server tcllib]}] 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.37 -r1.38 --- openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 4 Apr 2013 09:06:54 -0000 1.37 +++ openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 12 Apr 2013 16:12:56 -0000 1.38 @@ -82,7 +82,7 @@ } { set components [split $path "/"] - set dirs_in_pageroot [llength [split [ns_info pageroot] "/"]] ;# See comments by RBM + set dirs_in_pageroot [llength [split $::acs::pageroot "/"]] ;# See comments by RBM # Fix to cope with both full and relative paths if { [string index $path 0] eq "/"} { Index: openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl,v diff -u -r1.32 -r1.33 --- openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 29 Dec 2008 22:01:28 -0000 1.32 +++ openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 12 Apr 2013 16:12:56 -0000 1.33 @@ -313,7 +313,7 @@ render the template and write it to the file system with template::util::write_file } { - set output_path [ns_info pageroot]$url_stub + set output_path $::acs::pageroot$url_stub init url_stub root_path 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.9 -r1.10 --- openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 8 Dec 2012 18:20:36 -0000 1.9 +++ openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 12 Apr 2013 16:12:56 -0000 1.10 @@ -12,8 +12,8 @@ Get the page root. All items will be published to the filesystem with their URLs relative to this root. The page root is controlled by the PageRoot parameter in CMS. - A relative path is relative to [ns_info pageroot] - The default is [ns_info pageroot] + A relative path is relative to $::acs::pageroot + The default is $::acs::pageroot @return The page root @@ -27,7 +27,7 @@ if { [string index $root_path 0] ne "/" } { # Relative path, prepend server_root - set root_path "[ns_info pageroot]/$root_path" + set root_path "$::acs::pageroot/$root_path" } return [ns_normalizepath $root_path] Index: openacs-4/packages/acs-content-repository/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/index.vuh,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-content-repository/www/index.vuh 7 Jul 2003 12:25:53 -0000 1.8 +++ openacs-4/packages/acs-content-repository/www/index.vuh 12 Apr 2013 16:12:56 -0000 1.9 @@ -11,7 +11,7 @@ } # Get the paths -set the_root [ns_info pageroot] +set the_root $::acs::pageroot set the_url [ad_conn path_info] set content_type "" Index: openacs-4/packages/acs-content-repository/www/doc/guide/publish.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/guide/publish.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-content-repository/www/doc/guide/publish.html 24 Sep 2002 00:14:41 -0000 1.3 +++ openacs-4/packages/acs-content-repository/www/doc/guide/publish.html 12 Apr 2013 16:12:56 -0000 1.4 @@ -43,7 +43,7 @@ # Get the paths set the_url [ad_conn path_info] -set the_root [ns_info pageroot] +set the_root $::acs::pageroot # Get the IDs set content_root \ Index: openacs-4/packages/acs-core-docs/www/files/acs-pgbackup-init.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/acs-pgbackup-init.txt,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/files/acs-pgbackup-init.txt 16 Jan 2003 13:30:35 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/files/acs-pgbackup-init.txt 12 Apr 2013 16:12:56 -0000 1.4 @@ -13,7 +13,7 @@ set ftp_password "my-ftp-password" set ftp_dir "my-ftp-path" set ftp_server "my.ftpserver.com" - set bak "[file dirname [ns_info pageroot]]/backup" + set bak "[file dirname $::acs::pageroot]/backup" set servername "[ns_info server]" set pguser "[db_get_username]" Index: openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl,v diff -u -r1.29 -r1.30 --- openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 19 Jan 2010 23:53:59 -0000 1.29 +++ openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 12 Apr 2013 16:12:56 -0000 1.30 @@ -410,7 +410,7 @@ # if it is an excluded directory, just return set url_stub [ad_conn url] - set full_filename "[ns_info pageroot]$url_stub" + set full_filename "$::acs::pageroot$url_stub" foreach naked_pattern [ad_naked_html_patterns] { @@ -614,7 +614,7 @@ # if it is an excluded directory, just return set url_stub [ad_conn url] - set full_filename "[ns_info pageroot]$url_stub" + set full_filename "$::acs::pageroot$url_stub" foreach naked_pattern [ad_naked_html_patterns] { if { [string match $naked_pattern $url_stub] } { Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.112 -r1.113 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 8 Apr 2013 15:50:25 -0000 1.112 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 12 Apr 2013 16:12:56 -0000 1.113 @@ -869,7 +869,7 @@ rp_debug -debug t "error in rp_handler: $errmsg" } - set resolve_values [concat [ns_info pageroot][string trimright [ad_conn package_url] /] \ + set resolve_values [concat $::acs::pageroot[string trimright [ad_conn package_url] /] \ [apm_package_url_resolution [ad_conn package_key]]] foreach resolve_value $resolve_values { Index: openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 2 Oct 2007 19:04:57 -0000 1.19 +++ openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 12 Apr 2013 16:12:57 -0000 1.20 @@ -88,7 +88,7 @@ ad_proc -public get_server_root {} { Get the server root directory (supposing we run under ACS) } { - file dir [ns_info tcllib] + file dir $::acs::tcllib } Index: openacs-4/packages/acs-templating/tcl/debug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/Attic/debug-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/tcl/debug-procs.tcl 8 Dec 2012 17:50:20 -0000 1.5 +++ openacs-4/packages/acs-templating/tcl/debug-procs.tcl 12 Apr 2013 16:12:57 -0000 1.6 @@ -8,7 +8,7 @@ foreach file $files { - set file [ns_info tcllib]/$file + set file $::acs::tcllib/$file set proc_name [info commands ::template::mtimes::tcl::$file] set mtime [file mtime $file] Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.44 -r1.45 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 17 Oct 2010 21:06:09 -0000 1.44 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 12 Apr 2013 16:12:57 -0000 1.45 @@ -363,7 +363,7 @@ # set the asset url for images set assets "[template::get_resource_path]/assets" # assume resources are under page root (not safe) - regsub "^[ns_info pageroot]" $assets {} assets + regsub "^$::acs::pageroot" $assets {} assets # ensure that the style template has been compiled and is up-to-date template::adp_init adp $file_stub Index: openacs-4/packages/acs-templating/tcl/util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/util-procs.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-templating/tcl/util-procs.tcl 10 Jan 2007 21:22:12 -0000 1.25 +++ openacs-4/packages/acs-templating/tcl/util-procs.tcl 12 Apr 2013 16:12:57 -0000 1.26 @@ -503,7 +503,7 @@ ad_proc -public template::util::resolve_directory_url { url } { Resolve the file name for a directory URL } { - set path [ns_info pageroot]$url + set path $::acs::pageroot$url if { [file isdirectory $path] && [file exists ${path}index.adp] } { set url ${url}index.acs Index: openacs-4/packages/acs-templating/www/doc/install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/install.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/doc/install.html 13 Mar 2001 22:59:27 -0000 1.1 +++ openacs-4/packages/acs-templating/www/doc/install.html 12 Apr 2013 16:12:57 -0000 1.2 @@ -124,7 +124,7 @@ ResourcePath Specifies the absolute path to the system templates directory, containing sitewide styles for forms, system messages, etc. Defaults to -[ns_info pageroot]/ats/resources. +$::acs::pageroot/ats/resources. Index: openacs-4/packages/ajaxhelper/www/doc/acs-integration-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/doc/acs-integration-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ajaxhelper/www/doc/acs-integration-procs.tcl 8 Sep 2007 14:21:22 -0000 1.1 +++ openacs-4/packages/ajaxhelper/www/doc/acs-integration-procs.tcl 12 Apr 2013 16:12:57 -0000 1.2 @@ -88,7 +88,7 @@ ad_proc -public get_server_root {} { Get the server root directory (supposing we run under ACS) } { - file dir [ns_info tcllib] + file dir $::acs::tcllib } Index: openacs-4/packages/assessment/www/asm-admin/view/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/view/index.vuh,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/asm-admin/view/index.vuh 1 Feb 2005 22:07:01 -0000 1.1 +++ openacs-4/packages/assessment/www/asm-admin/view/index.vuh 12 Apr 2013 16:12:57 -0000 1.2 @@ -8,7 +8,7 @@ } # Get the paths -set the_root [ns_info pageroot] +set the_root $::acs::pageroot set package_id [ad_conn package_id] # Get the IDs Index: openacs-4/packages/assessment/www/view/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/view/index.vuh,v diff -u -r1.5 -r1.6 --- openacs-4/packages/assessment/www/view/index.vuh 15 May 2007 20:14:18 -0000 1.5 +++ openacs-4/packages/assessment/www/view/index.vuh 12 Apr 2013 16:12:57 -0000 1.6 @@ -8,7 +8,7 @@ } # Get the paths -set the_root [ns_info pageroot] +set the_root $::acs::pageroot set package_id [ad_conn package_id] # Get the IDs Index: openacs-4/packages/file-storage/www/view/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/view/index.vuh,v diff -u -r1.7 -r1.8 --- openacs-4/packages/file-storage/www/view/index.vuh 27 May 2009 12:09:02 -0000 1.7 +++ openacs-4/packages/file-storage/www/view/index.vuh 12 Apr 2013 16:12:57 -0000 1.8 @@ -11,7 +11,7 @@ } # Get the paths -set the_root [ns_info pageroot] +set the_root $::acs::pageroot set the_url [ad_conn path_info] set content_type "content_revision" Index: openacs-4/packages/lars-blogger/www/admin/migrate-categories.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/migrate-categories.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/admin/migrate-categories.tcl 16 Oct 2006 15:21:54 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/admin/migrate-categories.tcl 12 Apr 2013 16:12:57 -0000 1.4 @@ -13,6 +13,6 @@ set title "[_ lars-blogger.Categories_Migration]" -set fp [open [ns_info pageroot]/../packages/lars-blogger/www/admin/migrate-categories-1.tcl] +set fp [open $::acs::pageroot/../packages/lars-blogger/www/admin/migrate-categories-1.tcl] set meat [read $fp] close $fp Index: openacs-4/packages/oacs-dav/tcl/tDAV-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/tcl/tDAV-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/oacs-dav/tcl/tDAV-procs.tcl 30 Mar 2013 21:59:57 -0000 1.11 +++ openacs-4/packages/oacs-dav/tcl/tDAV-procs.tcl 12 Apr 2013 16:12:57 -0000 1.12 @@ -173,7 +173,7 @@ set name [ns_config "ns/server/[ns_info server]/tdav" propdir] if {[string equal "" $name]} { - set name [file join [ns_info pageroot] "../propdir/${uri}"] + set name [file join $::acs::pageroot "../propdir/${uri}"] } else { set name [file join $name $uri] } @@ -205,7 +205,7 @@ set name [ns_config "ns/server/[ns_info server]/tdav" lockdir] if {[string equal "" $name]} { - set name [file join [ns_info pageroot] "../lockdir/${uri}"] + set name [file join $::acs::pageroot "../lockdir/${uri}"] } else { set name [file join $name $uri] } @@ -591,7 +591,7 @@ proc tdav::webdav_proppatch {} { set uri [ns_conn url] regsub {^/} $uri {} uri - set filename [file join [ns_info pageroot] $uri] + set filename [file join $::acs::pageroot $uri] set body "" set ret_code 200 if {![file exists $filename]} { @@ -640,16 +640,16 @@ # wait, no, this is right as long as the DAV request is correct # so fuck it if {$depth > 0} { - set entries [glob -nocomplain [file join [ns_info pageroot] $uri *]] + set entries [glob -nocomplain [file join $::acs::pageroot $uri *]] } else { - set entries [glob -nocomplain [file join [ns_info pageroot] $uri]] + set entries [glob -nocomplain [file join $::acs::pageroot $uri]] } foreach entry $entries { set entry_props [list] set filename [lindex [file split $entry] end] # Tcl befuddles me: - set href [string replace $entry 1 [string length [ns_info pageroot]] ""] + set href [string replace $entry 1 [string length $::acs::pageroot] ""] file stat $entry file_stat set collection_p [string equal "directory" $file_stat(type)] @@ -749,7 +749,7 @@ # test for url existence regsub {^/} [ns_conn url] {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] # parse the xml body to check if its valid if {![string equal "" $xml] && [catch {dom parse $xml} xd]} { ns_return 400 text/plain "XML request not well-formed." @@ -817,7 +817,7 @@ proc tdav::webdav_put {} { set uri [ns_conn url] set uri [string trimleft $uri "/"] - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] set filename [lindex [file split $entry] end] set tmpfile [tdav::conn tmpfile] set ret_code 500 @@ -871,7 +871,7 @@ proc tdav::webdav_delete {} { set uri [ns_conn url] regsub {^/} $uri {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] set filename [lindex [file split $entry] end] set ret_code 500 @@ -937,15 +937,15 @@ set uri [ns_conn url] regsub {^/} $uri {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] set filename [lindex [file split $entry] end] regsub {/[^/]*/*$} $entry {} parent_dir if ![file exists $parent_dir] { set ret_code 409 } elseif ![file exists $entry] { file mkdir $entry - file mkdir [file join [ns_info pageroot] "../props/" $uri] + file mkdir [file join $::acs::pageroot "../props/" $uri] set ret_code 201 } else { set ret_code 405 @@ -971,19 +971,19 @@ set dest [tdav::conn destination] - set local_dest [ns_info pageroot] + set local_dest $::acs::pageroot append local_dest $dest - set newuri [string replace $local_dest 1 [string length [ns_info pageroot]] ""] + set newuri [string replace $local_dest 1 [string length $::acs::pageroot] ""] regsub {^/} $newuri {} newuri set uri [ns_conn url] regsub {^/} $uri {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] set filename [lindex [file split $entry] end] regsub {^/} [ns_conn url] {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] if {![file exists $entry]} { set ret_code 404 @@ -1029,15 +1029,15 @@ set overwrite [tdav::conn overwrite] set dest [tdav::conn destination] set uri [ns_conn url] - set local_dest [ns_info pageroot] + set local_dest $::acs::pageroot append local_dest $dest - set newuri [string replace $local_dest 1 [string length [ns_info pageroot]] ""] + set newuri [string replace $local_dest 1 [string length $::acs::pageroot] ""] regsub {^/} $newuri {} newuri set uri [ns_conn url] regsub {^/} $uri {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] set filename [lindex [file split $entry] end] set ret_code 500 @@ -1123,7 +1123,7 @@ set owner [tdav::conn lock_owner] set uri [ns_conn url] regsub {^/} $uri {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] set filename [lindex [file split $entry] end] set existing_lock_token [tdav::conn lock_token] # if {![file exists $entry]} { @@ -1165,7 +1165,7 @@ proc tdav::webdav_unlock {} { set uri [ns_conn url] regsub {^/} $uri {} uri - set entry [file join [ns_info pageroot] $uri] + set entry [file join $::acs::pageroot $uri] set filename [lindex [file split $entry] end] if {![file exists $entry]} { Index: openacs-4/packages/static-pages/tcl/static-pages-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/tcl/static-pages-init.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/static-pages/tcl/static-pages-init.tcl 1 Nov 2003 08:45:39 -0000 1.4 +++ openacs-4/packages/static-pages/tcl/static-pages-init.tcl 12 Apr 2013 16:12:57 -0000 1.5 @@ -9,7 +9,7 @@ # the server root (e.g., "/web/mysite/"), not the web root (e.g., # "/web/mysite/www/"): --atp@piskorski.com, 2002/12/12 16:17 EST - nsv_set CR_LOCATIONS STATIC_PAGES "[file dirname [string trimright [ns_info tcllib] "/"]]" + nsv_set CR_LOCATIONS STATIC_PAGES "[file dirname [string trimright $::acs::tcllib "/"]]" } Index: openacs-4/packages/wp-slim/www/wp-presentation-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/wp-presentation-master.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/wp-presentation-master.tcl 9 Mar 2004 20:33:40 -0000 1.4 +++ openacs-4/packages/wp-slim/www/wp-presentation-master.tcl 12 Apr 2013 16:12:57 -0000 1.5 @@ -1,4 +1,4 @@ -set root_directory [file dirname [string trimright [ns_info tcllib] "/"]] +set root_directory [file dirname [string trimright $::acs::tcllib "/"]] source "$root_directory/www/default-master.tcl" set package_url [ad_conn package_url] set wp_header [wp_header $style_id] \ No newline at end of file