Index: openacs-4/packages/chat/www/room-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-delete-2.tcl,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/chat/www/room-delete-2.tcl 2 Mar 2019 17:51:10 -0000 1.8.2.2 +++ openacs-4/packages/chat/www/room-delete-2.tcl 29 Dec 2021 17:12:54 -0000 1.8.2.3 @@ -7,8 +7,17 @@ @cvs-id $Id$ } { room_id:naturalnum,notnull +} -validate { + id_is_a_room -requires room_id { + if {![::xo::dc 0or1row -prepare integer check_id { + select 1 from chat_rooms where room_id = :room_id + }]} { + ad_complain [_ chat.Room_not_found] + } + } } + permission::require_permission -object_id $room_id -privilege chat_room_delete if { [catch { Index: openacs-4/packages/chat/www/room-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-delete.tcl,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/chat/www/room-delete.tcl 2 Mar 2019 17:51:10 -0000 1.8.2.2 +++ openacs-4/packages/chat/www/room-delete.tcl 29 Dec 2021 17:12:54 -0000 1.8.2.3 @@ -11,6 +11,14 @@ room_id:onevalue pretty_name:onevalue context_bar:onevalue +} -validate { + id_is_a_room -requires room_id { + if {![::xo::dc 0or1row -prepare integer check_id { + select 1 from chat_rooms where room_id = :room_id + }]} { + ad_complain [_ chat.Room_not_found] + } + } } permission::require_permission -object_id $room_id -privilege chat_room_delete