Index: openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl 22 Mar 2008 18:16:32 -0000 1.9.2.1 +++ openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl 3 Apr 2008 20:14:57 -0000 1.9.2.2 @@ -62,6 +62,7 @@ # We use the privacy level that the user select set priv_level $user_level } + set send_email_url [ad_quotehtml "/shared/send-email?sendto=$user_id&return_url=$return_url"] switch $priv_level { "4" { return "<a href=\"mailto:$email\" title=\"#acs-subsite.Send_email_to_this_user#\">$email</a>" @@ -71,22 +72,23 @@ if { $email_image_id != "-1" } { # The user has an email image stored in the content repository set revision_id [content::item::get_latest_revision -item_id $email_image_id] - set export_vars "user_id=$user_id&revision_id=$revision_id" - set email_image "<a href=\"/shared/send-email?sendto=$user_id&return_url=$return_url\"><img border=0 align=middle src=/shared/email-image-bits.tcl?$export_vars></a>" + set img_src [ad_quotehtml "/shared/email-image-bits.tcl?user_id=$user_id&revision_id=$revision_id"] + set email_image "<a href=\"$send_email_url\"><img style=\"border:0\" src=\"$img_src\" alt=\"#acs-subsite.Email#\"></a>" } else { # Create a new email_image - if { [catch { set email_image [email_image::new_item -user_id $user_id -bgcolor $bgcolor -transparent $transparent] } errmsg ] } { + if { [catch { set email_image [email_image::new_item -user_id $user_id -return_url $return_url -bgcolor $bgcolor -transparent $transparent] } errmsg ] } { + ns_log Error "email_image::get_user_email failed \n $errmsg" # ImageMagick not present, we protect the email by adding # an image replacing the "@" symbol set email_user [lindex [split $email '@'] 0] set email_domain [lindex [split $email '@'] 1] - set email_image "<a href=\"/shared/send-email?sendto=$user_id&return_url=$return_url\">${email_user}<img border=0 align=middle src=/shared/images/at.gif>${email_domain}</a>" + set email_image "<a href=\"$send_email_url\">${email_user}<img style=\"border:0\" src=\"/shared/images/at.gif\" alt=\"@\">${email_domain}</a>" } } return $email_image } "2" { - return "<a href=\"/shared/send-email?sendto=$user_id&return_url=$return_url\">\#acs-subsite.Send_email_to_this_user\#</a>" + return "<a href=\"$send_email_url\">\#acs-subsite.Send_email_to_this_user\#</a>" } "1" { #Do not show e-mail @@ -110,6 +112,7 @@ ad_proc -public email_image::new_item { -user_id:required + {-return_url ""} {-bgcolor ""} {-transparent ""} } { @@ -182,9 +185,9 @@ # Delete the temporary file created by ImageMagick catch { file delete $dest_path } errMsg - set export_vars "user_id=$user_id&revision_id=$revision_id" - set email_image "<a href=\"/shared/send-email?sendto=$user_id\"><img align=middle border=0 \ - src=/shared/email-image-bits.tcl?$export_vars></a>" + set img_src [ad_quotehtml "/shared/email-image-bits.tcl?user_id=$user_id&revision_id=$revision_id"] + set send_email_url [ad_quotehtml "/shared/send-email?sendto=$user_id&return_url=$return_url"] + set email_image "<a href=\"$send_email_url\"><img style=\"border:0\" src=\"$img_src\" alt=\"#acs-subsite.Email#\"></a>" return "$email_image" } Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp,v diff -u -r1.20 -r1.20.2.1 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 15 May 2007 20:14:31 -0000 1.20 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 3 Apr 2008 20:14:57 -0000 1.20.2.1 @@ -32,7 +32,7 @@ <li> <%= [acs_community_member_link -user_id $users(user_id) -label "$users(first_names) $users(last_name)"] %> <if @read_private_data_p@ eq 1 or @user_id@ eq @users.user_id@> - (<%= [email_image::get_user_email -user_id $users(user_id)] %>) + (<%= [email_image::get_user_email -user_id $users(user_id) -return_url @return_url@] %>) </if> </li> </if> @@ -50,7 +50,7 @@ <li> <%= [acs_community_member_link -user_id $users(user_id) -label "$users(first_names) $users(last_name)"] %> <if @read_private_data_p@ eq 1 or @user_id@ eq @users.user_id@> - (<%= [email_image::get_user_email -user_id $users(user_id)] %>) + (<%= [email_image::get_user_email -user_id $users(user_id) -return_url @return_url@] %>) </if> </li> </if> @@ -66,7 +66,7 @@ <li> <%= [acs_community_member_link -user_id $users(user_id) -label "$users(first_names) $users(last_name)"] %> <if @read_private_data_p@ eq 1 or @user_id@ eq @users.user_id@> - (<%= [email_image::get_user_email -user_id $users(user_id)] %>) + (<%= [email_image::get_user_email -user_id $users(user_id) -return_url @return_url@] %>) </if> </li> </if> Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl,v diff -u -r1.11 -r1.11.8.1 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl 20 Apr 2004 21:13:34 -0000 1.11 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl 3 Apr 2008 20:14:57 -0000 1.11.8.1 @@ -30,6 +30,7 @@ set user_id [ad_conn user_id] set referer [ad_conn url] set community_id $config(community_id) +set return_url [ad_return_url] if { ![string equal $community_id 0] } {