Index: openacs-4/packages/faq/www/admin/faq-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/www/admin/faq-new-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/faq/www/admin/faq-new-2.tcl 19 Jan 2018 14:44:17 -0000 1.7 +++ openacs-4/packages/faq/www/admin/faq-new-2.tcl 3 Sep 2024 15:37:38 -0000 1.8 @@ -11,32 +11,17 @@ @param faq_name The short name of the faq } { - faq_id:naturalnum,notnull + faq_id:object_id,notnull faq_name:notnull,trim separate_p:boolean,notnull } -set package_id [ad_conn package_id] -set user_id [ad_conn user_id] -set creation_ip [ad_conn host] - permission::require_permission -object_id $package_id -privilege faq_create_faq -db_transaction { - db_exec_plsql create_faq { - begin - :1 := faq.new_faq ( - faq_id => :faq_id, - faq_name => :faq_name, - separate_p => :separate_p, - creation_user => :user_id, - creation_ip => :creation_ip, - context_id => :package_id - ); - end; - } -} -# on error ... +faq::new \ + -faq_id $faq_id \ + -faq_name $faq_name \ + -separate=$separate_p ad_returnredirect "." ad_script_abort