Index: openacs-4/packages/acs-tcl/tcl/defs-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/defs-procs.tcl,v
diff -u -r1.25 -r1.26
--- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 17 May 2003 10:04:18 -0000 1.25
+++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 14 Aug 2003 20:38:03 -0000 1.26
@@ -74,16 +74,15 @@
ad_proc ad_pvt_home {} {
This is the URL of a user's private workspace on the system, usually
- /pvt/home.tcl
+ [subsite]/pvt/home.tcl
} {
- return [ad_parameter -package_id [ad_acs_kernel_id] HomeURL]
+ return "[subsite::get_element -element url -notrailing][ad_parameter -package_id [ad_acs_kernel_id] HomeURL]"
}
ad_proc ad_admin_home {} {
- Returns the directory for the admin home. Currently hard-coded to /admin
- (should this be changed?).
+ Returns the directory for the admin home.
} {
- return "/admin"
+ return "[subsite::get_element -element url]admin"
}
# is this accurate? (rbm, aug 2002)
@@ -109,10 +108,10 @@
@return a link to the user's workspace if the user is logged in. Otherwise, a link to the page root.
} {
if { [ad_get_user_id] != 0 } {
- return "[ad_system_name]"
+ return "[subsite::get_element -element name]"
} else {
# we don't know who this person is
- return "[ad_system_name]"
+ return "[subsite::get_element -element name]"
}
}
@@ -143,7 +142,8 @@
} {
@return the url for the community member page of a particular user
} {
- return "[ad_parameter -package_id [ad_acs_kernel_id] CommunityMemberURL]?[export_vars user_id]"
+ return "[subsite::get_element -element url -notrailing][ad_parameter \
+ -package_id [ad_acs_kernel_id] CommunityMemberURL]?[export_vars user_id]"
}
ad_proc -public acs_community_member_link {
@@ -186,7 +186,8 @@
} {
@return the url for the community member admin page of a particular user
} {
- return "[ad_parameter -package_id [ad_acs_kernel_id] CommunityMemberAdminURL]?[export_vars user_id]"
+ return "[subsite::get_element -element url -notrailing][ad_parameter \
+ -package_id [ad_acs_kernel_id] CommunityMemberAdminURL]?[export_vars user_id]"
}
ad_proc -public acs_community_member_admin_link {
@@ -379,11 +380,13 @@
set please_correct "them"
}
+ subsite::get -array subsite_info
+
doc_return 200 text/html "[ad_header_with_extra_stuff "Problem with Your Input" "" ""]
Problem with Your Input
-to [ad_system_name]
+to $subsite_info(instance_name)
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.14 -r1.15
--- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 17 May 2003 10:04:18 -0000 1.14
+++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 14 Aug 2003 20:38:03 -0000 1.15
@@ -122,13 +122,15 @@
# can't have that cookie unless he had logged in securely
# at some time in the past.
# So just call sec_setup_session to generate a new token.
- # Otherwise, force a trip to /register
+ # Otherwise, force a trip to [subsite]/register
if { [catch {
set new_user_id [lindex [split [ad_get_signed_cookie "ad_user_login_secure"] {,}] 0] }] } {
-# ns_log notice "OACS= sec_handler:token invalid $errmsg"
+ # ns_log notice "OACS= sec_handler:token invalid $errmsg"
- ad_returnredirect "/register/index?return_url=[ns_urlencode [ad_conn url]?[ad_conn query]]"
- return filter_break
+
+ ad_returnredirect "[subsite::get_element \
+ -element url]register/index?return_url=[ns_urlencode [ad_conn url]?[ad_conn query]]"
+ return filter_break
} else {
sec_setup_session $new_user_id
}
@@ -525,7 +527,7 @@
ad_proc -public ad_redirect_for_registration {} {
- Redirects user to /register/index to require the user to
+ Redirects user to [subsite]/register/index to require the user to
register. When registration is complete, the user will be returned
to the current location. All variables in ns_getform (both posts and
gets) will be maintained.
@@ -550,19 +552,19 @@
incr form_counter_i
}
}
- ad_returnredirect "/register/?return_url=[ns_urlencode [ad_conn url]$url_args]"
+ ad_returnredirect "[subsite::get_element -element url]register/?return_url=[ns_urlencode [ad_conn url]$url_args]"
return
}
ad_proc -public ad_maybe_redirect_for_registration {} {
Checks to see if a user is logged in. If not, redirects to
- /register/index to require the user to register. When registration
- is complete, the user will return to the current location. All
- variables in ns_getform (both posts and gets) will be maintained.
- Note that this will return out of its caller so that the caller need
- not explicitly call "return". Returns the user id if login was
- succesful.
+ [subsite]/register/index to require the user to register.
+ When registration is complete, the user will return to the current
+ location. All variables in ns_getform (both posts and gets) will
+ be maintained. Note that this will return out of its caller so that
+ the caller need not explicitly call "return". Returns the user id
+ if login was succesful.
} {
set user_id [ad_conn user_id]
@@ -580,13 +582,13 @@
ad_proc -public -deprecated ad_restrict_entire_server_to_registered_users {conn args why} {
A preauth filter that will halt service of any page if the user is
unregistered, except the site index page and stuff underneath
- /register. Use permissions on the site node map to control access.
+ [subsite]/register. Use permissions on the site node map to control access.
} {
- if {![string match "/index.tcl" [ad_conn url]] && ![string match "/" [ad_conn url]] && ![string match "/register/*" [ad_conn url]] && ![string match "/SYSTEM/*" [ad_conn url]] && ![string match "/user_please_login.tcl" [ad_conn url]]} {
+ if {![string match "/index.tcl" [ad_conn url]] && ![string match "/" [ad_conn url]] && ![string match "*/register/*" [ad_conn url]] && ![string match "*/SYSTEM/*" [ad_conn url]] && ![string match "*/user_please_login.tcl" [ad_conn url]]} {
# not one of the magic acceptable URLs
set user_id [ad_conn user_id]
if {$user_id == 0} {
- ad_returnredirect "/register/?return_url=[ns_urlencode [ad_conn url]?[ad_conn query]]"
+ ad_returnredirect "[subsite::get_element -element url]register/?return_url=[ns_urlencode [ad_conn url]?[ad_conn query]]"
return filter_return
}
}