Index: openacs-4/packages/chat/chat.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/chat.info,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/chat/chat.info 10 Oct 2009 22:38:09 -0000 1.15
+++ openacs-4/packages/chat/chat.info 14 Dec 2010 15:04:43 -0000 1.16
@@ -7,7 +7,7 @@
f
f
-
+
Peter Alberer
Server based chat with an html and ajax client.
2006-04-11
@@ -16,7 +16,7 @@
Adapted by Tekne 2006/03/01 to replace JAVA server with AJAX; make use of generalized chat class from xotcl-core.
0
-
+
Index: openacs-4/packages/chat/sql/postgresql/chat-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/sql/postgresql/chat-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/chat/sql/postgresql/chat-create.sql 19 Nov 2007 01:14:15 -0000 1.7
+++ openacs-4/packages/chat/sql/postgresql/chat-create.sql 14 Dec 2010 15:04:43 -0000 1.8
@@ -552,7 +552,7 @@
v_msg chat_msgs.msg%TYPE;
begin
-- Get msg id from the global acs_object sequence.
- select acs_object_id_seq.nextval into v_msg_id from dual;
+ select nextval(''t_acs_object_id_seq'') into v_msg_id from dual;
select archive_p into v_msg_archive_p from chat_rooms where room_id = p_room_id;
Index: openacs-4/packages/chat/sql/postgresql/upgrade/upgrade-5.0d8-5.0d9.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat/sql/postgresql/upgrade/upgrade-5.0d8-5.0d9.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/chat/sql/postgresql/upgrade/upgrade-5.0d8-5.0d9.sql 14 Dec 2010 15:04:44 -0000 1.1
@@ -0,0 +1,49 @@
+-- PG 9.0 support
+-- @author Victor Guerra ( vguerra@gmail.com )
+
+create or replace function chat_room__message_post (integer, varchar, integer, varchar)
+returns integer as '
+declare
+ p_room_id alias for $1;
+ p_msg alias for $2;
+ p_creation_user alias for $3;
+ p_creation_ip alias for $4;
+ -- p_html_p alias for $3;
+ -- p_approved_p alias for $4;
+ v_msg_id chat_msgs.msg_id%TYPE;
+ v_msg_archive_p chat_rooms.archive_p%TYPE;
+ v_msg chat_msgs.msg%TYPE;
+begin
+ -- Get msg id from the global acs_object sequence.
+ select nextval(''t_acs_object_id_seq'') into v_msg_id from dual;
+
+
+ select archive_p into v_msg_archive_p from chat_rooms where room_id = p_room_id;
+
+ if v_msg_archive_p = ''t'' then
+ v_msg := p_msg;
+ else
+ v_msg := null;
+ end if;
+
+ -- TO DO: aproved_p, Hhtml_p and lengh
+ -- Insert into chat_msgs table.
+ insert into chat_msgs (
+ msg_id,
+ room_id,
+ msg,
+ creation_user,
+ creation_ip,
+ creation_date)
+ values (
+ v_msg_id,
+ p_room_id,
+ v_msg,
+ p_creation_user,
+ p_creation_ip,
+ now()) ;
+
+
+
+return 0;
+end;' language 'plpgsql';