Index: openacs-4/packages/logger/tcl/entry-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/entry-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/logger/tcl/entry-procs.tcl 1 May 2003 10:00:24 -0000 1.3 +++ openacs-4/packages/logger/tcl/entry-procs.tcl 27 Mar 2004 01:08:20 -0000 1.4 @@ -16,6 +16,7 @@ {-value:required} {-time_stamp:required} {-description ""} + {-party_id ""} } {
Create a logger entry. @@ -33,17 +34,23 @@ @param time_stamp The point in time the measurment is tied to. Must be on ANSI format. Can be a date or a date and a time. @param description A short (less than 4000 chars) text describing the entry. + @param party_id The party that is entering the + logged entry. Defaults to ad_conn user_id if nothing is passed in @return The entry_id of the created project. @author Peter Marklund } { logger::util::set_vars_from_ad_conn {creation_user creation_ip} + + if {[exists_and_not_null party_id]} { + set creation_user $party_id + } set entry_id [db_exec_plsql insert_entry {}] # The creator can admin his own entry - permission::grant -party_id [ad_conn user_id] -object_id $entry_id -privilege admin + permission::grant -party_id $creation_user -object_id $entry_id -privilege admin return $entry_id }