Index: openacs-4/packages/forums/forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v diff -u -r1.40 -r1.41 --- openacs-4/packages/forums/forums.info 9 Nov 2008 23:29:26 -0000 1.40 +++ openacs-4/packages/forums/forums.info 27 Mar 2009 07:42:09 -0000 1.41 @@ -6,32 +6,36 @@ <pretty-plural>Forums</pretty-plural> <initial-install-p>f</initial-install-p> <singleton-p>f</singleton-p> + <implements-subsite-p>f</implements-subsite-p> + <inherit-templates-p>t</inherit-templates-p> - <version name="1.3d8" url="http://openacs.org/repository/download/apm/forums-1.3d8.apm"> + <version name="1.3d9" url="http://openacs.org/repository/download/apm/forums-1.3d9.apm"> <owner url="http://openacs.org">OpenACS</owner> <summary>Online discussion forums.</summary> - <release-date>2008-09-16</release-date> + <release-date>2009-03-27</release-date> <vendor url="http://openacs.org">OpenACS</vendor> <description format="text/plain">This online discussion board software is the successor of the original bboard package. The biggest improvement is a scalable datamodel. Forums supports threaded and flat view, moderation, a stand alone search function as well as integration with the OpenACS search package and integration with the notifications package for email alerts. It also supports reply via email.</description> <maturity>0</maturity> <package_instance_name>#forums.Forums#</package_instance_name> - <provides url="forums" version="1.3d8"/> - <requires url="acs-kernel" version="5.4.2"/> - <requires url="acs-mail-lite" version="5.4.2"/> - <requires url="acs-subsite" version="5.4.2"/> + <provides url="forums" version="1.3d9"/> + <requires url="acs-kernel" version="5.3.1a1"/> + <requires url="acs-mail-lite" version="5.3.1a1"/> + <requires url="acs-subsite" version="5.3.1a1"/> <requires url="attachments" version="0.10"/> - <requires url="notifications" version="5.4.2"/> + <requires url="notifications" version="5.3.0d1"/> <callbacks> <callback type="before-upgrade" proc="forum::install::package_upgrade"/> <callback type="before-uninstall" proc="forum::install::package_uninstall"/> <callback type="after-install" proc="forum::install::package_install"/> + <callback type="before-uninstantiate" proc="forum::install::before-uninstantiate"/> </callbacks> <parameters> <parameter datatype="number" min_n_values="1" max_n_values="1" name="DisplayEmoticonsAsImagesP" default="1" description="Automatically convert smileys like :-) and similar constructs to images when displaying messages in the browser."/> <parameter datatype="number" min_n_values="1" max_n_values="1" name="ForumsSearchBoxP" default="1" description="Whether to display a forums specific searchbox within the page body (not desirable when there is a sitewide search in the header)."/> <parameter datatype="number" min_n_values="1" max_n_values="1" name="UseIntermediaForSearchP" default="0" description="Should we use intermedia for searching forums? Intermedia is more scalable, but interprets searches differently from standard search."/> + <parameter datatype="number" min_n_values="1" max_n_values="1" name="UseReadingInfo" default="0" description="Should ReadingInfo be stored and displayed for this forum"/> <parameter datatype="number" min_n_values="1" max_n_values="1" name="UseScreenNameP" default="0" description="Weather the real user name or only the (anonymous) screenName will be shown in forums. Do not revert to 0 if once set to 1, since this will discard the beforehand granted anonymity."/> <parameter datatype="string" min_n_values="1" max_n_values="1" name="table_bgcolor" default="#eeeeee" description="This is the color of the first message / table row"/> <parameter datatype="number" min_n_values="1" max_n_values="1" name="table_border_color" default="#dddddd" description="The color of the table borders and between the cells, try #ffffff for a cool look"/> Index: openacs-4/packages/forums/tcl/forums-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-install-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/forums/tcl/forums-install-procs.tcl 20 Sep 2008 12:10:28 -0000 1.8 +++ openacs-4/packages/forums/tcl/forums-install-procs.tcl 27 Mar 2009 07:42:09 -0000 1.9 @@ -64,3 +64,23 @@ } } + + +ad_proc -private forum::install::before-uninstantiate { + -package_id +} { + Make sure all threads are deleted before the forum is uninstantiated. + @author realfsen@km.co.at + @creation-date 2009.03.24 +} { + # Delete each message in the each forum + foreach set_id [forum::list_forums -package_id $package_id] { + ad_ns_set_to_tcl_vars $set_id ;# get the forum_id + foreach message_id [db_list _ "select message_id from forums_messages where forum_id = :forum_id"] { + forum::message::delete -message_id $message_id + } + db_exec_plsql _ "select forums_forum__delete(:forum_id)" + # Ã R: is this really necessary ?? + callback::forum::forum_delete::contract -package_id $package_id -forum_id $forum_id + } +}