Index: openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 29 May 2007 05:40:16 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 20 Aug 2007 21:49:04 -0000 1.6 @@ -6,14 +6,19 @@ @cvs-id $Id$ } { user_id:integer - {size ""} + {item_id ""} + {size ""} } -if { ![db_0or1row get_item_id ""] } { -# ad_return_error "Couldn't find portrait" "Couldn't find a portrait for User $user_id" - return -} +# If the item_id is provided then we are fine +if {$item_id eq ""} { + if { ![db_0or1row get_item_id ""] } { + # ad_return_error "Couldn't find portrait" "Couldn't find a portrait for User $user_id" + return + } +} + if {$size eq ""} { cr_write_content -item_id $item_id } else {