forum::message::initial_message (public, deprecated)

 forum::message::initial_message [ -forum_id forum_id ] \
    [ -parent parent ] -message message

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

Deprecated. Invoking this procedure generates a warning.

Create an array with values initialized for a new message. DEPRECATED: this proc is not used in current upstream code, its upvar juggling is questionable and most of the data returned is already provided from the start.

Switches:
-forum_id (optional)
-parent (optional)
-message (required)

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
ns_log Notice "Deprecated proc forum::message::initial_message used:\n[ad_get_tcl_call_stack]"

    upvar $message init_msg

    if { $forum_id eq "" && $parent eq "" } {
        return -code error [_ forums.lt_You_either_have_to]
    }

    if { $parent ne "" } {
        upvar $parent parent_msg

        set init_msg(parent_id) $parent_msg(message_id)
        set init_msg(forum_id) $parent_msg(forum_id)
        set init_msg(subject)  [forum::format::reply_subject $parent_msg(subject)]
    } else {
        set init_msg(forum_id) $forum_id
        set init_msg(parent_id) ""
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/forums/tcl/messages-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: