Index: openacs-4/packages/contacts/tcl/contacts-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-init.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/tcl/contacts-init.tcl 28 May 2005 15:44:06 -0000 1.6 +++ openacs-4/packages/contacts/tcl/contacts-init.tcl 8 Jun 2005 05:10:58 -0000 1.7 @@ -1,8 +1,19 @@ ad_library { - + Init file for contacts - + @author Matthew Geddert (openacs@geddert.com) @creation-date 2004-08-16 } +if {[empty_string_p [info procs callback]]} { + ad_proc -public callback { + -catch:boolean + {-impl *} + callback + args + } { + Placeholder for contacts to work on 5.1 + } { + } +} Index: openacs-4/packages/contacts/www/contact-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact-add.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/contacts/www/contact-add.tcl 7 Jun 2005 19:00:49 -0000 1.4 +++ openacs-4/packages/contacts/www/contact-add.tcl 8 Jun 2005 05:10:59 -0000 1.5 @@ -38,7 +38,7 @@ -edit_buttons [list [list Save save] [list "[_ contacts.Save_and_Add_Another]" save_add_another]] \ -form $form_elements -#callback contact::contact_form -package_id $package_id -form party_ae -object_type $object_type +callback contact::contact_form -package_id $package_id -form party_ae -object_type $object_type ad_form -extend -name party_ae \ -on_request { @@ -86,14 +86,14 @@ } -new_data { if { $object_type == "person" } { - if { [string is false [exists_and_not_null email]] } { + if { ![exists_and_not_null email]] } { set email "$party_id@bogusdomain.com" set username $party_id } - if { [string is false [exists_and_not_null username]] } { + if { ![exists_and_not_null username]] } { set username $email } - if { [string is false [exists_and_not_null url]] } { + if { ![exists_and_not_nul url]] } { set url "" } db_transaction { @@ -114,7 +114,7 @@ if { "$email" == "$party_id@bogusdomain.com" } { # we need to delete the party email address - party::update -party_id $party_id -email "" -url [db_string get_url { select url from parties where party_id = :party_id } -default {}] + party::update -party_id $party_id -email "" -url $url } if { [string equal $creation_info(creation_status) "ok"] } { @@ -169,7 +169,7 @@ -form_name "party_ae" \ -object_id [contact::revision::new -party_id $party_id] -# callback contact::contact_new_form -package_id $package_id -contact_id $party_id -form party_ae -object_type $object_type + callback contact::contact_new_form -package_id $package_id -contact_id $party_id -form party_ae -object_type $object_type util_user_message -html -message "The $object_type [contact::name -party_id $party_id] was added"