Index: openacs-4/packages/chat/chat.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/chat.info,v
diff -u -r1.22.2.10 -r1.22.2.11
--- openacs-4/packages/chat/chat.info 27 Mar 2019 10:29:39 -0000 1.22.2.10
+++ openacs-4/packages/chat/chat.info 13 May 2019 10:02:55 -0000 1.22.2.11
@@ -9,7 +9,7 @@
f
t
-
+
Peter Alberer
Server based chat with an html and ajax client.
2019-03-01
@@ -22,7 +22,7 @@
0
-
+
Index: openacs-4/packages/chat/tcl/apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/apm-callback-procs.tcl,v
diff -u -r1.1.2.4 -r1.1.2.5
--- openacs-4/packages/chat/tcl/apm-callback-procs.tcl 7 Mar 2019 14:44:02 -0000 1.1.2.4
+++ openacs-4/packages/chat/tcl/apm-callback-procs.tcl 13 May 2019 10:02:55 -0000 1.1.2.5
@@ -38,5 +38,16 @@
}
ns_write "\nFinished!"
}
+ 6.0.0d6 6.0.0d7 {
+ ns_write "
Setting rooms and transcripts package_id to context_id where missing"
+ set n_rows [::xo::dc dml update_package {
+ update acs_objects set
+ package_id = context_id
+ where object_type in ('chat_room', 'chat_transcript')
+ and package_id is null
+ }]
+ ns_write "
$n_rows objects updated."
+ ns_write "
Finished!"
+ }
}
}
Index: openacs-4/packages/chat/tcl/chat-ajax-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-ajax-procs.tcl,v
diff -u -r1.23.2.6 -r1.23.2.7
--- openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 28 Mar 2019 14:04:44 -0000 1.23.2.6
+++ openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 13 May 2019 10:02:55 -0000 1.23.2.7
@@ -41,7 +41,7 @@
return [_ chat.Room_not_found]
} else {
set r [::xo::db::Class get_instance_from_db -id $chat_id]
- set package_id [$r set context_id]
+ set package_id [$r set package_id]
set chat_skin [parameter::get -package_id $package_id -parameter ChatSkin]
next -chat_id $chat_id \
-skin $chat_skin \
Index: openacs-4/packages/chat/tcl/chat-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-procs.tcl,v
diff -u -r1.24.2.6 -r1.24.2.7
--- openacs-4/packages/chat/tcl/chat-procs.tcl 2 Mar 2019 17:51:10 -0000 1.24.2.6
+++ openacs-4/packages/chat/tcl/chat-procs.tcl 13 May 2019 10:02:55 -0000 1.24.2.7
@@ -24,7 +24,7 @@
#array set row [chat_room_get_not_cached $room_id]
}
-ad_proc -private chat_room_get_not_cached {
+ad_proc -deprecated -private chat_room_get_not_cached {
room_id
} {
set r [::xo::db::Class get_instance_from_db -id $room_id]
Index: openacs-4/packages/chat/tcl/xotcl-chat-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/xotcl-chat-procs.tcl,v
diff -u -r1.1.2.5 -r1.1.2.6
--- openacs-4/packages/chat/tcl/xotcl-chat-procs.tcl 15 Mar 2019 16:11:10 -0000 1.1.2.5
+++ openacs-4/packages/chat/tcl/xotcl-chat-procs.tcl 13 May 2019 10:02:55 -0000 1.1.2.6
@@ -161,7 +161,7 @@
::xo::db::chat_room instproc save_new {} {
if {![info exists :context_id]} {
- set :context_id [expr {[ns_conn isconnected] ? [ad_conn package_id] : ""}]
+ set :context_id ${:package_id}
}
::xo::dc transaction {
set room_id [next]
@@ -240,7 +240,11 @@
and msg is not null
order by creation_date
} {
- set user_name [expr {$creation_user > 0 ? [chat_user_name $creation_user] : "system"}]
+ if {$creation_user > 0} {
+ set user_name [::chat::Package get_user_name -user_id $creation_user]
+ } else {
+ set user_name "system"
+ }
lappend contents "\[$creation_date\] ${user_name}: $msg"
}
if {[llength $contents] > 0} {
@@ -281,7 +285,7 @@
::xo::db::chat_transcript instproc save_new {} {
if {![info exists :context_id]} {
- set :context_id [expr {[ns_conn isconnected] ? [ad_conn package_id] : ""}]
+ set :context_id ${:package_id}
}
::xo::dc transaction {
set transcript_id [next]
Index: openacs-4/packages/chat/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/index.tcl,v
diff -u -r1.18.2.6 -r1.18.2.7
--- openacs-4/packages/chat/www/index.tcl 27 Mar 2019 17:13:24 -0000 1.18.2.6
+++ openacs-4/packages/chat/www/index.tcl 13 May 2019 10:02:55 -0000 1.18.2.7
@@ -37,7 +37,7 @@
from chat_rooms rm,
acs_objects obj
where rm.room_id = obj.object_id
- and obj.context_id = :package_id
+ and obj.package_id = :package_id
and acs_permission.permission_p(rm.room_id, :user_id, 'chat_read')
order by rm.pretty_name
} {
Index: openacs-4/packages/chat/www/room-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-edit.tcl,v
diff -u -r1.15.2.3 -r1.15.2.4
--- openacs-4/packages/chat/www/room-edit.tcl 2 Mar 2019 17:51:10 -0000 1.15.2.3
+++ openacs-4/packages/chat/www/room-edit.tcl 13 May 2019 10:02:55 -0000 1.15.2.4
@@ -91,7 +91,7 @@
-logout_messages_p $logout_messages_p \
-messages_time_window $messages_time_window \
-avatar_p $avatar_p \
- -context_id [ad_conn package_id] \
+ -package_id [ad_conn package_id] \
-creation_user [ad_conn user_id] \
-creation_ip [ad_conn peeraddr] \
-pretty_name $pretty_name]
Index: openacs-4/packages/chat/www/transcript-new-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/transcript-new-2.tcl,v
diff -u -r1.5.2.2 -r1.5.2.3
--- openacs-4/packages/chat/www/transcript-new-2.tcl 2 Mar 2019 17:51:10 -0000 1.5.2.2
+++ openacs-4/packages/chat/www/transcript-new-2.tcl 13 May 2019 10:02:55 -0000 1.5.2.3
@@ -18,7 +18,7 @@
set t [::xo::db::chat_transcript new \
-description $description \
- -context_id $package_id \
+ -package_id $package_id \
-creation_user $user_id \
-creation_ip $creation_ip \
-pretty_name $transcript_name \