Index: openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl,v diff -u -r1.7.2.6 -r1.7.2.7 --- openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 13 Jan 2005 23:39:19 -0000 1.7.2.6 +++ openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 15 Apr 2005 17:00:42 -0000 1.7.2.7 @@ -71,6 +71,18 @@ @see content::symlink::new content::extlink::new content::folder::new } { + if {![info exists creation_user]} { + set creation_user [ad_conn user_id] + } + + if {![info exists creation_ip]} { + set creation_ip [ad_conn peeraddr] + } + + if {![exists_and_not_null content_type]} { + set content_type [::content::item::content_type -item_id $item_id] + } + set var_list [list] lappend var_list \ [list name $name] \ @@ -209,7 +221,8 @@ # content_type query was unsucessful, item does not exist return 0 } - set table_name [db_string get_table_name "select table_name from acs_object_types where object_type=:content_type"] + set table_name [acs_object_type::get_table_name -object_type $content_type] + set table_name "${table_name}x" # get attributes of the content_item use the content_typex view return [db_0or1row get_item "" -column_array local_array]