Index: openacs-4/packages/chat/tcl/xotcl-chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/Attic/xotcl-chat-procs.tcl,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/chat/tcl/xotcl-chat-procs.tcl 2 Mar 2019 17:51:10 -0000 1.1.2.2 +++ openacs-4/packages/chat/tcl/xotcl-chat-procs.tcl 4 Mar 2019 15:12:22 -0000 1.1.2.3 @@ -79,6 +79,18 @@ creation_date {timestamp with time zone} } + # TODO: We should consider adding acs_object attributes as slots + # for the generic ::xo::db::Object, so we don't have to specify + # the fetch query here. + ::xo::db::chat_room proc fetch_query {id} { + return [subst { + select r.*, o.* + from chat_rooms r, acs_objects o + where r.room_id = o.object_id + and r.room_id = $id + }] + } + ::xo::db::chat_room instproc grant_creator {} { if {${:creation_user} ne ""} { foreach privilege {edit view delete} { @@ -159,14 +171,6 @@ } } - ::xo::db::chat_room instproc get_instance_from_db {} { - next - ::xo::dc 1row get_metadata { - select context_id, creation_ip, creation_user - from acs_objects where object_id = :room_id - } - } - ::xo::db::chat_room instproc save_new {} { if {![info exists :creation_user]} { set :creation_user [expr {[ns_conn isconnected] ? [ad_conn user_id] : ""}]