Index: openacs-4/packages/news/tcl/news-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-callback-procs.tcl,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/news/tcl/news-callback-procs.tcl 16 Nov 2005 12:25:30 -0000 1.1.2.7 +++ openacs-4/packages/news/tcl/news-callback-procs.tcl 18 Nov 2005 09:43:11 -0000 1.1.2.8 @@ -118,6 +118,9 @@ db_exec_plsql create_news_item_revision {} } #does the new includes images? + + +return $news_id } Index: openacs-4/packages/news/tcl/news-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.tcl,v diff -u -r1.20.2.7 -r1.20.2.8 --- openacs-4/packages/news/tcl/news-procs.tcl 16 Nov 2005 12:14:56 -0000 1.20.2.7 +++ openacs-4/packages/news/tcl/news-procs.tcl 18 Nov 2005 09:43:11 -0000 1.20.2.8 @@ -17,49 +17,60 @@ } { if {[info exist community_id] == 0} { - set community_id [dotlrn_community::get_community_id] + set community_id [dotlrn_community::get_community_id] } - +ns_log Notice "community_id: $community_id" db_1row get_news_package_id {} return $package_id } ad_proc news_create_new { + {-item_id "null"} {-locale "null"} -publish_date_ansi {-publish_body "null"} {-nsl_language "null"} {-publish_title "null"} - {-mime_type "null"} - -package_id - {-archive_date_ansi "null"} - {-approval_user "null"} - {-approval_date "null"} - {-approval_ip "null"} + {-mime_type "text/plain"} + -package_id:required + -archive_date_ansi + -approval_user + -approval_date + -approval_ip {-relation_tag "null"} -creation_ip -user_id - {-live_revision_p "null"} + {-live_revision_p "t"} {-publish_lead "null"} } { Create a New } { - if {[info exist package_id] == 0} { - set package_id [dotlrn_community::get_package_id] - } if {[info exist user_id] == 0} { set user_id [ad_conn user_id] } + if {[info exist approval_user] == 0} { + set approval_user [ad_conn user_id] + } + if {[info exist creation_ip] == 0} { set creation_ip [ad_conn host] } + if {[info exist approval_ip] == 0} { + set approval_ip [ad_conn host] + } if {[info exist publish_date_ansi] == 0} { set publish_date_ansi [dt_systime] } - + if {[info exist archive_date_ansi] == 0} { + set archive_date_ansi [dt_systime] + } + if {[info exist approval_date] == 0} { + set approval_date [dt_systime] + } + set news_id [db_exec_plsql create_news_item {}] return $news_id