Index: openacs-4/packages/cms/www/modules/items/comment-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/comment-add.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/modules/items/comment-add.tcl 20 Apr 2001 20:51:10 -0000 1.1 +++ openacs-4/packages/cms/www/modules/items/comment-add.tcl 24 May 2001 01:30:52 -0000 1.2 @@ -4,7 +4,7 @@ item_id -datatype integer } -template::query item_title onevalue " +template::query get_title item_title onevalue " select content_item.get_title(:item_id) from dual " @@ -18,7 +18,7 @@ " if { [form is_request add_comment] } { - template::query journal_id onevalue " + template::query get_journal_id journal_id onevalue " select acs_object_id_seq.nextval from dual " element set_properties add_comment journal_id -value $journal_id @@ -31,21 +31,20 @@ set user_id [User::getID] set ip_address [ns_conn peeraddr] - set db [template::begin_db_transaction] + db_transaction { + set journal_id [db_exec_plsql new_entry " + begin + :1 = journal_entry.new( + journal_id => :journal_id, + object_id => :object_id, + action => 'comment', + action_pretty => 'Comment', + creation_user => :user_id, + creation_ip => :ip_address, + msg => :msg ); + end;"] - ns_ora exec_plsql_bind $db "begin - :journal_id := journal_entry.new( - journal_id => :journal_id, - object_id => :object_id, - action => 'comment', - action_pretty => 'Comment', - creation_user => :user_id, - creation_ip => :ip_address, - msg => :msg ); - end;" journal_id + } - template::end_db_transaction - template::release_db_handle - template::forward "index?item_id=$object_id" -} \ No newline at end of file +}