Index: openacs-4/packages/acs-subsite/www/user/portrait/upload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/portrait/upload.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/user/portrait/upload.tcl 29 May 2007 05:37:25 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/user/portrait/upload.tcl 21 Nov 2007 17:01:55 -0000 1.8 @@ -15,17 +15,11 @@ set current_user_id [ad_conn user_id] -set portrait_p [db_0or1row "checkportrait" {SELECT live_revision as revision_id, item_id - FROM acs_rels a, cr_items c - WHERE a.object_id_two = c.item_id - AND a.rel_type = 'user_portrait_rel' - AND a.object_id_one = :current_user_id - AND c.live_revision is not NULL -} ] +set portrait_p [db_0or1row "checkportrait" {}] if { $portrait_p } { - set story [db_string "getstory" "select description from cr_revisions where revision_id = :revision_id"] + set story [db_string "getstory" {}] } else { set story "" set revision_id "" @@ -41,10 +35,7 @@ ad_require_permission $user_id "write" -if {![db_0or1row name "select - first_names, last_name -from persons -where person_id=:user_id"]} { +if {![db_0or1row get_name {}]} { ad_return_error "Account Unavailable" "We can't find you (user #$user_id) in the users table. Probably your account was deleted for some reason." return }