emmar
committed
on 17 Mar 10
Initialize url_name for creating a new page or the call would fail. Added theme to the list of args to pass to page::new (was missing).
openacs-4/packages/ratings/www/rate.tcl (+5 -5)
1 1 # /packages/ratings/www/rate
2 2 ad_page_contract {
3 3     Save a rating provided by a user.
4 4
5 5     @author Jeff Davis davis@xarg.net
6 6
7 7     @creation-date 10/30/2003
8 8     @cvs-id $Id$
9 9 } {
10 10     object_id:integer,notnull
11 11     dimension_key:notnull
12 12     rating:integer,notnull
13 13     {return_url:trim {}}
14 14 }
15 15
16 16 set user_id [auth::require_login]
17 17
18   ratings::rate -dimension_key $dimension_key \
  18 set rating_id [ratings::rate -dimension_key $dimension_key \
19 19                    -object_id $object_id \
20 20                    -user_id $user_id \
21       -rating $rating
  21                    -rating $rating]
22 22
23 23 if {[empty_string_p $return_url]} {
24 24     set return_url [get_referrer]
25 25 }
26 26
27 27 ad_returnredirect -message "Your rating is now $rating for this item." $return_url