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 -N -r1.10.2.2 -r1.10.2.3 --- openacs-4/packages/acs-subsite/www/shared/portrait.tcl 14 Dec 2015 18:06:18 -0000 1.10.2.2 +++ openacs-4/packages/acs-subsite/www/shared/portrait.tcl 2 Jan 2016 20:57:58 -0000 1.10.2.3 @@ -18,18 +18,24 @@ set subsite_url [subsite::get_element -element url] -if {![db_0or1row user_info "select first_names, last_name from persons where person_id=:user_id"]} { +if {![db_0or1row user_info { + select first_names, last_name + from persons + where person_id = :user_id +}]} { ad_return_warning "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 - 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'"]} { +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' +}]} { ad_return_complaint 1 "
  • You shouldn't have gotten here; we don't have a portrait on file for this person." return }