Index: openacs-4/packages/forums/lib/message/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/delete.tcl,v diff -u -r1.6 -r1.6.2.1 --- openacs-4/packages/forums/lib/message/delete.tcl 7 Apr 2018 19:07:31 -0000 1.6 +++ openacs-4/packages/forums/lib/message/delete.tcl 14 Feb 2019 15:00:15 -0000 1.6.2.1 @@ -6,7 +6,7 @@ @creation-date 2002-05-24 @cvs-id $Id$ -} +} set table_border_color [parameter::get -parameter table_border_color] @@ -24,7 +24,9 @@ set message(tree_level) 0 -set confirm_url [export_vars -base "message-delete" {message_id return_url {confirm_p 1}}] +set confirm_url [export_vars -base "message-delete" { + {message_id:sign(max_age=60) $message(message_id)} return_url {confirm_p 1} +}] if {[info exists alt_template] && $alt_template ne ""} { ad_return_template $alt_template Index: openacs-4/packages/forums/lib/message/row.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/row.adp,v diff -u -r1.26 -r1.26.2.1 --- openacs-4/packages/forums/lib/message/row.adp 25 Jun 2018 09:15:00 -0000 1.26 +++ openacs-4/packages/forums/lib/message/row.adp 14 Feb 2019 15:00:15 -0000 1.26.2.1 @@ -57,7 +57,7 @@
  • #forums.edit#
  • -
  • #forums.delete#
  • +
  • #forums.delete#
  • #forums.Move_thread_to_other_forum#
  • #forums.Move_thread_to_other_thread#
  • Index: openacs-4/packages/forums/lib/message/row.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/row.tcl,v diff -u -r1.16 -r1.16.2.1 --- openacs-4/packages/forums/lib/message/row.tcl 25 Jun 2018 09:15:00 -0000 1.16 +++ openacs-4/packages/forums/lib/message/row.tcl 14 Feb 2019 15:00:15 -0000 1.16.2.1 @@ -59,6 +59,10 @@ set notflat_p [expr {$presentation_type ne "flat"}] set post_and_notflat_p [expr {$post_p && $notflat_p}] set any_action_p [expr {$post_and_notflat_p || $viewer_id || $moderate_p}] + + set delete_url [export_vars -base "moderate/message-delete" { + {message_id:sign(max_age=60) $message(message_id)} + }] } template::add_body_script -script [subst { Index: openacs-4/packages/forums/lib/message/row2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/row2.adp,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/forums/lib/message/row2.adp 7 Aug 2017 23:48:11 -0000 1.4 +++ openacs-4/packages/forums/lib/message/row2.adp 14 Feb 2019 15:00:15 -0000 1.4.2.1 @@ -9,7 +9,7 @@
  • #forums.forward#
  • #forums.Edit#
  • -
  • #forums.delete#
  • +
  • #forums.delete#
  • #forums.Move_thread_to_other_forum#
  • #forums.Move_thread_to_other_thread#
  • Index: openacs-4/packages/forums/lib/message/row2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/row2.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/forums/lib/message/row2.tcl 24 Jul 2018 18:54:44 -0000 1.5 +++ openacs-4/packages/forums/lib/message/row2.tcl 14 Feb 2019 15:00:15 -0000 1.5.2.1 @@ -85,6 +85,10 @@ set allow_edit_own_p [parameter::get -parameter AllowUsersToEditOwnPostsP -default 0] set own_p [expr {$message(user_id) eq $viewer_id && $allow_edit_own_p}] +set delete_url [export_vars -base "moderate/message-delete" { + {message_id:sign(max_age=60) $message(message_id)} +}] + template::add_event_listener -id "toggle$message(message_id)" -script [subst { dynamicExpand('$message(message_id)'); }] Index: openacs-4/packages/forums/www/moderate/message-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-delete.tcl,v diff -u -r1.18 -r1.18.2.1 --- openacs-4/packages/forums/www/moderate/message-delete.tcl 27 Sep 2017 11:07:52 -0000 1.18 +++ openacs-4/packages/forums/www/moderate/message-delete.tcl 14 Feb 2019 15:00:15 -0000 1.18.2.1 @@ -7,20 +7,21 @@ @cvs-id $Id$ } { - message_id:naturalnum,notnull + message_id:naturalnum,notnull,verify {return_url:localurl "../message-view"} {confirm_p:boolean 0} } -# Select the stuff +# +# Select the forums message into the Tcl array (including message_id) +# forum::message::get -message_id $message_id -array message # Check that the user can moderate the forum forum::security::require_moderate_forum -forum_id $message(forum_id) # stylesheets -set lang [ad_conn language] -template::head::add_css -href /resources/forums/forums.css -media all -lang $lang +template::head::add_css -href /resources/forums/forums.css -media all -lang [ad_conn language] # js scripts template::head::add_script -type "text/javascript" -src "/resources/forums/forums.js"