forum::edit (public)
forum::edit -forum_id forum_id [ -name name ] [ -charter charter ] \ [ -presentation_type presentation_type ] \ [ -posting_policy posting_policy ] \ [ -new_questions_allowed_p new_questions_allowed_p ] \ [ -anonymous_allowed_p anonymous_allowed_p ] \ [ -attachments_allowed_p attachments_allowed_p ] [ -no_callback ]
Defined in packages/forums/tcl/forums-procs.tcl
Edit a forum
- Switches:
- -forum_id (required)
- -name (optional)
- -charter (optional)
- -presentation_type (optional)
- -posting_policy (optional)
- -new_questions_allowed_p (optional)
- -anonymous_allowed_p (optional)
- -attachments_allowed_p (optional)
- -no_callback (optional, boolean)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- web_forum_edit, web_forums_message_and_reply
Source code: forum::get -forum_id $forum_id -array forum foreach var { name charter presentation_type posting_policy new_questions_allowed_p anonymous_allowed_p attachments_allowed_p} { if {![info exists $var]} { set $var $forum($var) } } # This is a straight DB update db_dml update_forum {} db_dml update_forum_object {} if {!$no_callback_p} { callback forum::forum_edit -package_id [ad_conn package_id] -forum_id $forum_id } forum::flush_cache -forum_id $forum_idGeneric XQL file: <fullquery name="forum::edit.update_forum"> <querytext> update forums_forums set name = :name, charter = :charter, presentation_type = :presentation_type, posting_policy = :posting_policy, new_questions_allowed_p = :new_questions_allowed_p, anonymous_allowed_p = :anonymous_allowed_p, attachments_allowed_p = :attachments_allowed_p where forum_id = :forum_id </querytext> </fullquery> <fullquery name="forum::edit.update_forum_object"> <querytext> update acs_objects set title = :name, last_modified = current_timestamp, modifying_user = [ad_conn user_id] where object_id = :forum_id </querytext> </fullquery>packages/forums/tcl/forums-procs.xql
PostgreSQL XQL file: packages/forums/tcl/forums-procs-postgresql.xql
Oracle XQL file: packages/forums/tcl/forums-procs-oracle.xql