Index: openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 29 Jan 2006 16:16:28 -0000 1.24 +++ openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 1 Feb 2006 01:09:35 -0000 1.25 @@ -88,6 +88,15 @@ } { } +ad_proc -public -callback contacts::redirect { + {-party_id ""} + {-action ""} +} { + This callback is executed by /package/contacts/index.vuh. If you want contact urls to map + to or override standard files/links this is where you can customize the rp_internal_redirect + or add your own ad_returnredirect +} - + ad_proc -public -callback contacts::bulk_actions { {-multirow:required} } { @@ -239,4 +248,4 @@ dotlrn_club::add_user -community_id $community_id -user_id $employee_id } } -} \ No newline at end of file +} Index: openacs-4/packages/contacts/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.vuh,v diff -u -r1.11 -r1.12 --- openacs-4/packages/contacts/www/index.vuh 14 Dec 2005 17:29:44 -0000 1.11 +++ openacs-4/packages/contacts/www/index.vuh 1 Feb 2006 01:09:38 -0000 1.12 @@ -5,6 +5,7 @@ # @creation-date 2005-05-24 # @cvs-id $Id$ + set package_url [ad_conn package_url] set file_url [ad_conn path_info] set file_list [split $file_url "/"] @@ -18,13 +19,19 @@ set action [lindex $file_list 1] +callback contacts::redirect -party_id $party_id -action $action + + + if { $party_is_contact_p } { if { [llength $file_list] == "1" } { # we need to redirect the user to their "correct" summary page otherwise # sub links will not work correctly ad_returnredirect "[ad_conn package_url]${party_id}/" ad_script_abort } + + set valid_pages [list "" edit files groups relationships comments message history changes mail-tracking create-club] if { [lsearch $valid_pages $action] >= 0 && [llength $file_list] == "2" } {