Index: openacs-4/packages/forums/lib/forums/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/new.tcl,v diff -u -r1.9.2.2 -r1.9.2.3 --- openacs-4/packages/forums/lib/forums/new.tcl 19 Jun 2019 16:43:21 -0000 1.9.2.2 +++ openacs-4/packages/forums/lib/forums/new.tcl 19 Jun 2019 17:26:58 -0000 1.9.2.3 @@ -24,10 +24,20 @@ forums::form::forum forum +# Check if the attachments package is mounted under the forum package instance +set attachments_p [forum::attachments_enabled_p] + if {[form is_valid forum]} { template::form get_values forum \ - forum_id name charter presentation_type posting_policy new_threads_p anonymous_allowed_p attachments_allowed_p + forum_id name charter presentation_type posting_policy new_threads_p anonymous_allowed_p + # Display the option only if the attachments package is mounted + if {$attachments_p} { + template::form get_values forum attachments_allowed_p + } else { + set attachments_allowed_p t + } + # Users can create new threads? set new_questions_allowed_p [expr {$new_threads_p && $posting_policy ne "closed" ? t : f}] @@ -53,8 +63,11 @@ element set_properties forum forum_id -value $forum_id element set_value forum new_threads_p t element set_value forum anonymous_allowed_p f - element set_value forum attachments_allowed_p t element set_value forum name $name + # Display the option only if the attachments package is mounted + if {$attachments_p} { + element set_value forum attachments_allowed_p t + } } if {[info exists alt_template] && $alt_template ne ""} {