oracle8.1.6
begin
:1 := bboard_forum.forum_p(:forum_id);
end;
begin
:1 := bboard_forum.new (
forum_id => :forum_id,
short_name => :short_name,
charter => :charter,
moderated_p => :moderated_p,
bboard_id => :bboard_id,
context_id => :context_id,
creation_user => :creation_user,
creation_ip => :creation_ip
);
end;
begin
bboard_forum.set_attrs (
forum_id => :forum_id,
short_name => :short_name,
charter => :charter,
moderated_p => :moderated_p,
bboard_id => :bboard_id
);
end;
begin
:1 := bboard_category.category_p(:category_id);
end;
begin
:1 := bboard_category.new (
category_id => :category_id,
short_name => :short_name,
description => :description,
forum_id => :forum_id
);
end;
begin
bboard_category.set_attrs (
category_id => :category_id,
short_name => :short_name,
description => :description,
forum_id => :forum_id
);
end;
begin
:1 := bboard_message.new (
message_id => :message_id,
reply_to => :reply_to,
sent_date => :sent_date,
sender => :sender,
title => :title,
mime_type => :mime_type,
data => empty_blob(),
context_id => :context_id,
creation_user => :creation_user,
creation_ip => :creation_ip
);
end;
update cr_revisions
set content = empty_blob()
where revision_id = :revision_id
returning content into :1
begin
bboard_message.set_attrs (
message_id => :message_id,
reply_to => :reply_to,
sent_date => :sent_date,
sender => :sender,
title => :title,
mime_type => :mime_type,
context_id => :context_id
);
end;
update cr_revisions
set content = empty_blob()
where revision_id = :revision_id
returning content into :1
begin
bboard_message.clear_categories ( :message_id );
end;
begin
bboard_message.add_category (
message_id => :message_id,
category_id => :category_id
);
end;
begin
bboard_message.remove_category (
message_id => :message_id,
category_id => :category_id
);
end;
begin
bboard_message.set_status (
message_id => :message_id,
forum_id => :forum_id,
status => :status
);
end;
begin
bboard_forum.subscribe (
forum_id => :forum_id,
subscriber_id => :subscriber_id
);
end;
begin
bboard_category.subscribe (
category_id => :category_id,
subscriber_id => :subscriber_id
);
end;
begin
bboard_message.subscribe (
thread_id => :thread_id,
subscriber_id => :subscriber_id
);
end;
select count(*) as subscribed_p from bboard_thread_subscribers
where subscriber_id = :user_id
and thread_id in (select message_id
from acs_messages b
connect by b.message_id = prior b.reply_to
start with message_id = :message_id)
select bboard_forum.forum_containing_message(:message_id) as forum_id
from dual
select acs_message.first_ancestor(:message_id) as ancestor_id
from dual
begin
:1 := acs_message.new_image (
message_id => :message_id,
image_id => :file_id,
file_name => :short_filename,
title => :title,
mime_type => :mime_type,
content => empty_blob(),
width => :width,
height => :height,
creation_user => :user_id,
creation_ip => :creation_ip,
is_live => 't'
);
end;
select content_item.get_latest_revision(:file_id) as revision_id
from dual
update cr_revisions
set filename = :filename,
content_length = :file_size
where revision_id = :revision_id
begin
:1 := acs_message.new_file (
message_id => :message_id,
file_id => :file_id,
file_name => :short_filename,
title => :title,
mime_type => :mime_type,
content => empty_blob(),
creation_user => :user_id,
creation_ip => :creation_ip,
is_live => 't'
);
end;
select content_item.get_latest_revision(:file_id) as revision_id
from dual
update cr_revisions
set filename = :filename,
content_length = :file_size
where revision_id = :revision_id
select image_id
from images
where image_id = content_item.get_latest_revision(:file_id)
begin
acs_message.delete_image(:file_id);
end;
begin
acs_message.delete_file(:file_id);
end;
update cr_items
set latest_revision=null, live_revision=null
where item_id = -1;
declare
cursor alerts_cursor is
select object_id
from acs_objects
where object_id in (select object_id
from acs_objects
where object_type = 'bboard_message'
start with context_id in (select forum_id
from bboard_forums)
connect by prior object_id = context_id)
and object_id not in (select message_id
from bboard_forum_message_map)
order by object_id desc;
begin
for alert_val in alerts_cursor loop
bboard_message.remove(alert_val.object_id);
end loop;
end;
select subscriber_id as recipient_id, thread_id as grouping_id,
sysdate as wait_until
from bboard_thread_subscribers s
where s.thread_id in (select message_id
from acs_messages
start with message_id = :message_id
connect by message_id = prior reply_to)
and s.subscriber_id in (select party_id
from all_object_party_privilege_map
where object_id = :message_id
and privilege = 'bboard_read_message')
select s.subscriber_id as recipient_id, s.category_id as grouping_id,
sysdate as wait_until
from bboard_category_subscribers s, bboard_category_message_map m
where m.message_id = :message_id
and s.category_id = m.category_id
and s.subscriber_id in (select party_id
from acs_object_party_privilege_map
where object_id = :message_id
and privilege = 'bboard_read_message')
select s.subscriber_id as recipient_id, s.forum_id as grouping_id,
sysdate as wait_until
from bboard_forum_subscribers s, bboard_forum_message_map m
where m.message_id = :message_id
and s.forum_id = m.forum_id
and s.subscriber_id in (select party_id
from acs_object_party_privilege_map
where object_id = :message_id
and privilege = 'bboard_read_message')