Index: openacs-4/packages/acs-subsite/www/shared/portrait-thumbnail-bits.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/Attic/portrait-thumbnail-bits.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/www/shared/portrait-thumbnail-bits.tcl 27 Oct 2014 16:40:02 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/shared/portrait-thumbnail-bits.tcl 7 Aug 2017 23:47:59 -0000 1.5 @@ -14,16 +14,20 @@ set column portrait_thumbnail -set file_type [db_string -default "" unused "select portrait_file_type -from users -where user_id = $user_id -and portrait_thumbnail is not null"] +set file_type [db_string unused { + select portrait_file_type + from users + where user_id = :user_id + and portrait_thumbnail is not null +}] -default "" if { $file_type eq "" } { # Try to get a regular portrait - set file_type [db_string -default "" unused "select portrait_file_type -from users -where user_id = $user_id"] + set file_type [db_string unused { + select portrait_file_type + from users + where user_id = :user_id + } -default "" ] if {$file_type eq ""} { ad_return_error "Couldn't find thumbnail or portrait" "Couldn't find a thumbnail or a portrait for User $user_id" return @@ -33,7 +37,15 @@ ReturnHeaders $file_type -ns_ora write_blob $db "select $column -from users -where user_id = $user_id" +ns_ora write_blob $db [subst { + select $column + from users + where user_id = :user_id +}] + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: