delete.tcl

Delete a Message

Location:
/packages/forums/lib/message/delete.tcl
Author:
Ben Adida <ben@openforce.net>
Created:
2002-05-24
CVS ID:
$Id: delete.tcl,v 1.6.2.3 2019/02/15 13:25:58 gustafn Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {

    Delete a Message

    @author Ben Adida (ben@openforce.net)
    @creation-date 2002-05-24
    @cvs-id $Id: delete.tcl,v 1.6.2.3 2019/02/15 13:25:58 gustafn Exp $

}

set table_border_color [parameter::get -parameter table_border_color]

# Confirmed?
if {$confirm_p} {
    # Delete the message and all children
    forum::message::delete -message_id $message(message_id)

    # Redirect to the forum
    ad_returnredirect "../forum-view?forum_id=$message(forum_id)"
    ad_script_abort
}

set message_id $message(message_id)

set message(tree_level) 0

set confirm_url [export_vars -base "message-delete" {
    {message_id:sign(csrf) $message(message_id)} return_url {confirm_p 1}
}]

if {[info exists alt_template] && $alt_template ne ""} {
  ad_return_template $alt_template
}

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: