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 _ _ (public) ad_log_deprecated ad_log_deprecated (public) forum::format::reply_subject forum::format::reply_subject (public) forum::message::initial_message forum::message::initial_message forum::message::initial_message->_ forum::message::initial_message->ad_log_deprecated forum::message::initial_message->forum::format::reply_subject

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc forum::message::initial_message
    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: