Index: openacs-4/packages/faq/tcl/faq-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/tcl/faq-callback-procs.tcl,v diff -u -r1.1.2.6 -r1.1.2.7 --- openacs-4/packages/faq/tcl/faq-callback-procs.tcl 16 Nov 2005 11:47:27 -0000 1.1.2.6 +++ openacs-4/packages/faq/tcl/faq-callback-procs.tcl 3 Mar 2006 12:43:39 -0000 1.1.2.7 @@ -4,91 +4,7 @@ @creation_date 2005-07-08 } -ad_proc -public -callback datamanager::move_faq -impl datamanager { - -object_id:required - -selected_community:required -} { - Move a faq to another class or community -} { - db_1row get_faqs_package {} - - db_transaction { - db_dml update_faqs_q_and_a {} - db_dml update_faqs {} - } on_error { - ad_return_error "Database error" "A database error occured:
$errmsg" - } -} - - -ad_proc -public -callback datamanager::delete_faq -impl datamanager { - -object_id:required - -selected_community:required -} { - Move a faq to the trash -} { -set trash_id [datamanager::get_trash_id] -set trash_package_id [datamanager::get_trash_package_id] - db_transaction { - db_dml del_update_faqs_q_and_a {} - db_dml del_update_faqs {} - } on_error { - ad_return_error "Database error" "A database error occured:
$errmsg" - } -} - - -ad_proc -public -callback datamanager::copy_faq -impl datamanager { - -object_id:required - -selected_community:required -} { - Copy a faq to another class or community. Q&A are also copied -} { - -#get data about the faq - set package_id [faq::get_package_id -community_id $selected_community] - db_1row get_faq_name {} - - set user_id [ad_conn user_id] - set creation_ip [ad_conn host] - set faq_id [faq::faq_new -package_id $package_id -faq_name $faq_name -separate_p $separate_p] - - - -#get list of Q&A (ids) - set q_a_list [db_list_of_lists get_q_a_list {}] - - set q_a_number [llength $q_a_list] - -#for each Q&A, one entry - for {set i 0} {$i < $q_a_number} {incr i} { - - set one_question [lindex [lindex $q_a_list $i] 0] - set one_answer [lindex [lindex $q_a_list $i] 1] - set entry_id [db_nextval acs_object_id_seq] - set sort_key $entry_id - - db_transaction { - db_exec_plsql create_q_and_a { - begin - :1 := faq.new_q_and_a ( - entry_id => :entry_id, - context_id => :faq_id, - faq_id=> :faq_id, - question => :one_question, - answer => :one_answer, - sort_key => :sort_key, - creation_user => :user_id, - creation_ip => :creation_ip - ); - end; - } - } - } - return $faq_id -} - #Callbacks for application-track ad_proc -callback application-track::getApplicationName -impl faqs {} { @@ -149,4 +65,4 @@ return "OK" } - \ No newline at end of file + Fisheye: Tag 1.1.2.5 refers to a dead (removed) revision in file `openacs-4/packages/faq/tcl/faq-callback-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? 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.1.2.1 -r1.1.2.2 --- openacs-4/packages/faq/tcl/faq-procs.tcl 16 Nov 2005 11:34:52 -0000 1.1.2.1 +++ openacs-4/packages/faq/tcl/faq-procs.tcl 3 Mar 2006 12:43:39 -0000 1.1.2.2 @@ -7,52 +7,7 @@ @Modifyed by Gerardo Morales