Index: openacs-4/packages/forums/www/message-post.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post.tcl,v diff -u -r1.43.2.3 -r1.43.2.4 --- openacs-4/packages/forums/www/message-post.tcl 1 Jun 2016 21:24:41 -0000 1.43.2.3 +++ openacs-4/packages/forums/www/message-post.tcl 26 Sep 2016 18:48:55 -0000 1.43.2.4 @@ -11,19 +11,18 @@ {parent_id ""} } -validate { forum_id_or_parent_id { - if {$forum_id eq "" && $parent_id eq ""} { - ad_complain [_ forums.lt_You_either_have_to] - } - # - # GN: why can't we use {forum_id:integer ""} above? if we do so, the - # forum_id is not set! - # - if {$forum_id ne "" && ![string is integer $forum_id]} { - ad_complain [_ acs-templating.Invalid_integer] - } - if {$parent_id ne "" && ![string is integer $parent_id]} { - ad_complain [_ acs-templating.Invalid_integer] - } + if {$forum_id eq "" && $parent_id eq ""} { + ad_complain [_ forums.lt_You_either_have_to] + } + if {$forum_id ne "" && ![string is integer $forum_id]} { + ad_complain [_ acs-templating.Invalid_integer] + } + if {$forum_id ne "" && ![forum::valid_forum_id_p -forum_id $forum_id]} { + ad_complain [_ acs-templating.Invalid_integer] + } + if {$parent_id ne "" && ![string is integer $parent_id]} { + ad_complain [_ acs-templating.Invalid_integer] + } } }