Index: openacs-4/packages/chat/www/chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/chat.tcl,v diff -u -r1.20.2.2 -r1.20.2.3 --- openacs-4/packages/chat/www/chat.tcl 2 Mar 2019 17:51:10 -0000 1.20.2.2 +++ openacs-4/packages/chat/www/chat.tcl 4 Mar 2019 16:19:00 -0000 1.20.2.3 @@ -21,16 +21,18 @@ port:onevalue moderator_p:onevalue msgs:multirow +} -validate { + valid_room_id -requires room_id { + if { [catch { + set r [::xo::db::Class get_instance_from_db -id $room_id] + set room_name [$r set pretty_name] + } errmsg] } { + ad_complain [_ chat.Room_not_found] + ad_log Warning "Chat room not found. Invalid room_id: $room_id" + } + } } -if { [catch { - set r [::xo::db::Class get_instance_from_db -id $room_id] - set room_name [$r set pretty_name] -} errmsg] } { - ad_return_complaint 1 "[_ chat.Room_not_found]" - ad_script_abort -} - set doc(title) $room_name set doc(type) {}