forum::install::before-uninstantiate (private)

 forum::install::before-uninstantiate [ -package_id package_id ]

Defined in packages/forums/tcl/forums-install-procs.tcl

Make sure all threads are deleted before the forum is uninstantiated.

Switches:
-package_id (optional)
Author:
realfsen@km.co.at
Created:
2009.03.24

Partial Call Graph (max 5 caller/called nodes):
%3 callback::forum::forum_delete::contract callback::forum::forum_delete::contract (private) db_foreach db_foreach (public) forum::delete forum::delete (public) forum::message::delete forum::message::delete (public) forum::install::before-uninstantiate forum::install::before-uninstantiate forum::install::before-uninstantiate->callback::forum::forum_delete::contract forum::install::before-uninstantiate->db_foreach forum::install::before-uninstantiate->forum::delete forum::install::before-uninstantiate->forum::message::delete

Testcases:
No testcase defined.
Source code:
    #
    # For all forums in this package...
    #
    db_foreach get_forums {
        select forum_id from forums_forums where package_id = :package_id
    } {
        #
        # ...delete each message,...
        #
        db_foreach get_messages {
            select message_id from forums_messages where forum_id = :forum_id
        } {
            forum::message::delete -message_id $message_id
        }

        #
        # ...delete the forum,...
        #
        forum::delete -forum_id $forum_id

        #
        # ...and invoke the deletion callback.
        #
        callback::forum::forum_delete::contract -package_id $package_id -forum_id $forum_id
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: