Index: openacs-4/packages/forums/tcl/forums-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-sc-procs.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/forums/tcl/forums-sc-procs.tcl 3 Nov 2018 19:49:29 -0000 1.17 +++ openacs-4/packages/forums/tcl/forums-sc-procs.tcl 3 Sep 2024 15:37:38 -0000 1.18 @@ -1,8 +1,8 @@ ad_library { Forums Library - Search Service Contracts - - This library is DEPRECATED and NOT USED. search is implemented using + + This library is DEPRECATED and NOT USED. search is implemented using callbacks now. See forums-callback-procs.tcl This library will be definitely removed in 5.5 @@ -13,7 +13,7 @@ namespace eval forum::message {} -ad_proc -private forum::message::datasource { message_id } { +ad_proc -private -deprecated forum::message::datasource { message_id } { @param message_id @author dave@thedesignexperience.org @creation-date 2002-08-07 @@ -22,16 +22,19 @@ this is the content that will be indexed by the full text search engine. - We expect message_id to be a root message of a thread only, + We expect message_id to be a root message of a thread only, and return the text of all the messages below + DEPRECATED: search is implemented using callbacks now. + + @see forums-callback-procs.tcl } { # If there is no connection than this proc is called from the # search indexer. In that case we set the locale to the # system-wide default locale, since locale is needed for some part # of the message formatting. - if { ![ad_conn isconnected] } { + if { ![ns_conn isconnected] } { ad_conn -set locale [lang::system::site_wide_locale] } forum::message::get -message_id $message_id -array message @@ -40,7 +43,7 @@ ns_log Notice "forum::message::datasource was called with a message_id that has a parent - skipping: $message_id" return {object_id {} name {} charter {} mime {} storage_type {}} } - + set tree_sortkey $message(tree_sortkey) set forum_id $message(forum_id) set combined_content "" @@ -73,13 +76,16 @@ ns_log Notice "forum::message::datasource end" } -ad_proc -private forum::message::url { message_id } { +ad_proc -private -deprecated forum::message::url { message_id } { @param message_id @author dave@thedesignexperience.org @creation-date 2002-08-07 returns a URL for a message to the search package + DEPRECATED: search is implemented using callbacks now. + + @see forums-callback-procs.tcl } { forum::message::get -message_id $message_id -array message set forum_id $message(forum_id) @@ -92,7 +98,7 @@ namespace eval forum::forum {} -ad_proc -private forum::forum::datasource { +ad_proc -private -deprecated forum::forum::datasource { forum_id } { Datasource for the FtsContentProvider contract. @@ -101,6 +107,10 @@ @author Jeff Davis davis@xarg.net @creation-date 2004-04-01 + + DEPRECATED: search is implemented using callbacks now. + + @see forums-callback-procs.tcl } { if {![db_0or1row datasource { select @@ -119,7 +129,7 @@ return [array get datasource] } -ad_proc -private forum::forum::url { +ad_proc -private -deprecated forum::forum::url { forum_id } { url method for the FtsContentProvider contract @@ -128,6 +138,10 @@ @author Jeff Davis davis@xarg.net @creation-date 2004-04-01 + + DEPRECATED: search is implemented using callbacks now. + + @see forums-callback-procs.tcl } { return "[db_string select_forums_package_url {}]forum-view?forum_id=$forum_id" @@ -136,8 +150,12 @@ namespace eval forum::sc {} -ad_proc -private forum::sc::register_implementations {} { +ad_proc -private -deprecated forum::sc::register_implementations {} { Register the forum_forum and forum_message content type fts contract + + DEPRECATED: search is implemented using callbacks now. + + @see forums-callback-procs.tcl } { db_transaction { forum::sc::register_forum_fts_impl @@ -146,13 +164,23 @@ } ad_proc -private forum::sc::unregister_implementations {} { - db_transaction { - acs_sc::impl::delete -contract_name FtsContentProvider -impl_name forum_message - acs_sc::impl::delete -contract_name FtsContentProvider -impl_name forum_forum + This proc is de-facto deprecated, as search is implemented using + callbacks now, but we still need it to be there to support + upgrades from older versions. + + @see forums-callback-procs.tcl +} { + db_transaction { + acs_sc::impl::delete -contract_name FtsContentProvider -impl_name forums_message + acs_sc::impl::delete -contract_name FtsContentProvider -impl_name forums_forum } } -ad_proc -private forum::sc::register_forum_fts_impl {} { +ad_proc -private -deprecated forum::sc::register_forum_fts_impl {} { + DEPRECATED: search is implemented using callbacks now. + + @see forums-callback-procs.tcl +} { set spec { name "forums_forum" aliases { @@ -167,7 +195,11 @@ } -ad_proc -private forum::sc::register_message_fts_impl {} { +ad_proc -private -deprecated forum::sc::register_message_fts_impl {} { + DEPRECATED: search is implemented using callbacks now. + + @see forums-callback-procs.tcl +} { set spec { name "forums_message" aliases {