Index: openacs-4/packages/acs-subsite/www/shared/portrait.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/portrait.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/www/shared/portrait.tcl 13 Jan 2005 13:55:50 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/shared/portrait.tcl 10 Jan 2007 21:22:10 -0000 1.7 @@ -18,27 +18,27 @@ set subsite_url [subsite::get_element -element url] -if ![db_0or1row user_info "select +if {![db_0or1row user_info "select first_names, last_name from persons -where person_id=:user_id"] { +where person_id=:user_id"]} { ad_return_error "Account Unavailable" "We can't find user #$user_id in the users table." return } -if ![db_0or1row get_item_id "select i.width, i.height, cr.title, cr.description, cr.publish_date +if {![db_0or1row get_item_id "select i.width, i.height, cr.title, cr.description, cr.publish_date from acs_rels a, cr_items c, cr_revisions cr, images i where a.object_id_two = c.item_id and c.live_revision = cr.revision_id and cr.revision_id = i.image_id and a.object_id_one = :user_id -and a.rel_type = 'user_portrait_rel'"] { +and a.rel_type = 'user_portrait_rel'"]} { ad_return_complaint 1 "
  • You shouldn't have gotten here; we don't have a portrait on file for this person." return } -if { ![empty_string_p $width] && ![empty_string_p $height] } { +if { $width ne "" && $height ne "" } { set widthheight_param "width=$width height=$height" } else { set widthheight_param ""