Index: openacs-4/packages/faq/tcl/faq-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/tcl/faq-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/faq/tcl/faq-procs.tcl 12 Jul 2018 12:39:45 -0000 1.5 +++ openacs-4/packages/faq/tcl/faq-procs.tcl 3 Sep 2024 15:37:38 -0000 1.6 @@ -21,15 +21,51 @@ db_0or1row get_info "" -column_array faq_info } + ad_proc -public new { + -faq_id + -faq_name:required + -separate:boolean + {-package_id ""} + {-user_id ""} + {-creation_ip ""} + } { + Creates a new FAQ. + + @return integer faq_id + } { + if {![info exists faq_id]} { + set faq_id [db_nextval acs_object_id_seq] + } + + if {[ns_conn isconnected]} { + if {$package_id eq ""} { + set package_id [ad_conn package_id] + } + if {$user_id eq ""} { + set user_id [ad_conn user_id] + } + if {$creation_ip eq ""} { + set creation_ip [ad_conn host] + } + } + + db_exec_plsql create_faq {} + + return $faq_id + } + } namespace eval faq::notification { - ad_proc -public get_url { + ad_proc -private get_url { object_id } { - returns a full url to the object_id. - handles messages and forums. + This proc implements the GetURL operation of the + NotificationType Service Contract and should not be invoked + directly. + + @return a full URL to the object_id (an FAQ entry) } { set q_and_a_id $object_id