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 -N -r1.15 -r1.16 --- openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 13 Nov 2018 18:22:23 -0000 1.15 +++ openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 17 Jan 2019 13:48:20 -0000 1.16 @@ -12,6 +12,9 @@ # Show the portrait only to authenticated users auth::require_login +# Default avatar image +set default_avatar [acs_root_dir]/packages/acs-subsite/www/shared/avatar-x50.png + # # The size info is a valid geometry as provided for image magicks # "convert". We provide here a sample list of valid sizes @@ -30,7 +33,7 @@ if {[content::item::get -item_id $item_id -array_name itemInfo] == 0} { if {[content::item::get -item_id $item_id -array_name itemInfo -revision latest] == 0} { ad_log warning "cannot obtain revision info for item_id $item_id user_id $user_id" - ns_returnnotfound + ns_returnfile 200 image/png $default_avatar ad_script_abort } } @@ -89,12 +92,12 @@ } else { ad_log warning "cannot show portrait with item_id $item_id for user $user_id " - ns_returnnotfound + ns_returnfile 200 image/png $default_avatar } } } else { # Return default avatar image - ns_returnfile 200 image/png [acs_root_dir]/packages/acs-subsite/www/shared/avatar-x50.png + ns_returnfile 200 image/png $default_avatar } # Local variables: