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.8 -r1.9 --- openacs-4/packages/acs-subsite/www/shared/portrait.tcl 31 Mar 2009 14:58:07 -0000 1.8 +++ openacs-4/packages/acs-subsite/www/shared/portrait.tcl 27 Oct 2014 16:40:02 -0000 1.9 @@ -4,7 +4,7 @@ @creation-date 26 Sept 1999 @cvs-id $Id$ } { - user_id:integer + user_id:naturalnum,notnull } -properties { context:onevalue first_names:onevalue @@ -18,22 +18,18 @@ 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"]} { - ad_return_error "Account Unavailable" "We can't find user #$user_id in the users table." +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'"]} { + 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 } @@ -46,7 +42,7 @@ set doc(title) [_ acs-subsite.lt_Portrait_of_first_last] set context [list [list [acs_community_member_url -user_id $user_id] "$first_names $last_name"] [_ acs-subsite.Portrait]] -set export_vars [export_url_vars user_id] +set export_vars [export_vars -url {user_id}] set pretty_date [lc_time_fmt $publish_date "%q"] ad_return_template