Index: openacs-4/packages/ratings/www/rate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ratings/www/rate.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/ratings/www/rate.tcl 21 May 2004 07:48:05 -0000 1.3 +++ openacs-4/packages/ratings/www/rate.tcl 29 Jul 2005 23:08:24 -0000 1.3.2.1 @@ -11,17 +11,27 @@ dimension_key:notnull rating:integer,notnull {return_url:trim {}} + {nomem_p "f"} + {context_object_id ""} } + set user_id [auth::require_login] + + set rating_id [ratings::rate -dimension_key $dimension_key \ -object_id $object_id \ -user_id $user_id \ - -rating $rating] + -rating $rating \ + -nomem_p $nomem_p] +if { ![empty_string_p $context_object_id] } { + db_dml update_context_id { update ratings set context_object_id = :context_object_id where rating_id = :rating_id } +} + if {[empty_string_p $return_url]} { set return_url [get_referrer] } -ad_returnredirect -message "Your rating is now $rating for this item." $return_url +ad_returnredirect -message "Your rating is now $rating for this item $dimension_key." $return_url